Look up tapeworms from your pet. The little segments break apart and wiggle. Sometimes they come out more with hot weather. Possibly, the animal gets too hot for them. Not usually dangerous to you. The ones I've seen are slightly beige. Look at your pets' backsides. Cats and dogs.
The cure for that would be a Droncit shot for the pet or Praziquantal pills which you can buy at some pet stores.
Your vet can give a shot for all the other worms, like heart worms.
Any pet that has fleas ( goes outside) can have tapeworm. I've never seen wormlike young fleas.
Try Advantage II or Revolution as drops you can apply to the nape of the neck once a month. The over the counter flea collar is now thought to be toxic. Walmart has Advantage II.
By the way, where are you in general? If you're in another country that is tropical there are human tapeworms. Not to scare you, here.
"As Rover sleeps, tapeworm segments
The sac, called a "proglottid," is passed from the host's rectum and out into the world, either on the host's stool or on the host's rear
end. The segment
is the size of a grain of rice and is able to move. Eventually the segment
will dry and look more like a sesame seed.Jun 1, 2019"
Tapeworm - Mar Vista Animal Medical Center