be cautious. Some flatworms will release toxins when deceased. As Lee said, the red ones are quitre notorious for this. There are products (flatworm exit) that can be used, but FOLLOW THE DIRECTIONS!!! Or you could try top find a biological control. If they are in the sump, they are in the display. Or leave them be. They are usually harmless unless they are in such numbers the obscure light from corals.