Just to check: snail was alive when swarm spotted and it was rescued? My worm situation (rhabdocoela, I think) swarm anything dead...so at first I thought they were killing things... they swarmed a new Nerite in my tank that I think actually died in transit. And later when I crushed a pond snail they swarmed over. But as far as I can tell they ignore living pond snails, Shrimp etc.
I would add that, from my observation, locomotion is different for types of worms: planaria always seem to be smoothly gliding and racing to somewhere; rhabdocoela smoothly glide but at a much more leisurely/meandering pace; detritus worms tend to want to float around and just hangout, and when on glass seem to have inch worm movement (head reaching out, then pulling body behind)
If you become sure that these are killer/damaging, I suggest trying a worm or planaria trap. Some you tube videos show how to diy them, but also can be purchased.