yeah, definitely a flatworm, though they are usually more orange in color, I would try my best to get rid of them, several options:
1) since you have few of them (right?) manually suck them up with a siphon, and then add new water
2) Mandarin Goby (nice fish anyway!! either variety will eat...