Can't really tell from the photo... Is it flat or round? Segmented or solid? Does it have obvious mouth parts? Any other distinguishable features? It looks icky but I have a bias against the buggy looking creatures, be they aquatic or terrestrial. (Ewww.... Bugs) I would research nematodes, roundworms, and spaghetti worms. Maybe google worm identification and see if the pics give you any ideas. From my understanding the majority of the wormy critters are beneficial to your tank with some notable exceptions.