Definitely flatworms, probably harmless although they can quickly reproduce in plague proportions. I finally got my tank rid of them by adding a pair of Blue Star Leopard wrasses. They took care of every last one in short order. As a added bonus, they are model reef citizens, absolutely stunning to look at, and they're always out and about looking for more things to munch on!