They could be infected with any of a large variety of flatworms / parasites.
Often the small ones at the edges of where the shells connect are Branchiobdellida (Annelida: Clitellata) These are very tiny (although according to the article below could possibly be that size).
The ones on your pics look like larger flatworms and could be near anything.
The good news is that you can try a couple things, like a salt dip a few times as there can be eggs that hatch out too possibly, or a few kinds of medication.
Interesting educational article
WInvertebrates! Student Paper
You can use a dewormer.
Safeguard Liquid Goat dewormer which is fenbendazole will kill off a great number of worm types. It is liquid and more easily mixes for treatment and in a 10% suspension so easier to dose than the pill form of dog dewormer. Can be found at pet and farm / livestock supply stores.