its a flatworm alright, the real question here is which kind.
First of all by the time your see flatworms on your glass your tank must be totally infected, so I'm leaning towards good ol fashion flatworms (planaria) and not the kind you are worried(AEFW) although still possible you must check your corals for bite marks and so forth.
Nerite snail eggs are typically around your tank and in your glass, this does not look like one but keep it in mind.