It might be a spaghetti worm. If the antenna are long, they are actually feeding tongues. Not an expert but I have a ton in my tank and I have seen them on the glass before. Mostly they are in tunnels made from sand on the bottom.
If it's a spaghetti worm it's great. Good for biodiversity and eats detritus, reef friendly. Hard to tell from the pic. is it opaque / white in color?
It doesn't look like a flat worm in person?
If it's a flatworm it's going to be a polyclad, not acoel.
If polyclad, which is what I would guess, its bad. Pretty predatory on whatever invertebrate it can catch. If in doubt, I would remove it. It's not like you're going to threaten the world population of flatworms or endanger your tanks biodiversity. You're likely to save yourself problems in the future.
The only fish that I know of by reputation would be six line or some of the halichoeres wrasses. Some of them love snails or shrimp. Also they sleep in the sand. Concerning the polyclads, Ive never seen one out during day or crawling on glass. They usually hide in rocks and hunt the rocks at night. They move surprisingly fast and avoid light. I have limited experience but the two I've caught and removed were over an inch( 2.5 cm) in diameter. I found one devouring a small tuxedo urchin.
Sent from my iPhone using Tapatalk
I only found those two. The first was easy to remove since it was so intent on eating the urchin that I could pull the urchin out. The second disappeared in a coral piece and I removed the piece and pulled out the worm. It broke apart so I irrigated the small area with r/o water to get the pieces. The coral didn't like it but has done well since. I wouldn't do anything at the time. Why disturb the status quo for something that might not be a problem? Just keep your eyes open for anything and remove it if you get the chance
Sent from my iPhone using Tapatalk