Haha reminds me of one of the episode in X files where the planaria attacks a guy and he became planaria man!!
I used to cut up a lot of this in my lab during uni days, and having fun to watch them regenerate new whole bodies...
They come out from the gravel whenever there's a fish food feeding or liquid food for fries...therefore they are useful in cloudy tanks, but other than that they have no important function and is harmless...