In terms of harm - the flatworms will either cover the specimen so completely that the light is blocked and they die, or they will consume the flesh of the coral (depending on the coral). Afterwards, they will usually move on to the next specimen until nothing appetizing is left.
If there is anyway to remove the mushrooms from your tank, then simply do a freshwater dip and shake the mushroom. The sudden drop in salinity basically stuns and then kills the flatworms and the slight shaking will get them off the mushroom (they release within seconds of hitting the freshwater). Remember to always do a freshwater dip whenever you get in new corals (before you even put them in a quarantine tank) to get rid of alot of potential problems. At a minimum, the average coral should be in freshwater for 3 minutes (again, depends on the coral - some folks leave corals in the freshwater for up to 10 minutes but three usually works for me).
Good luck!