It's not a worm at all, it's a chiton in the genus Cryptoplax. There are several species all of which are long & appear to be worms because the 8 shell plates are mostly covered by the body. In most chitons the shell plates are much more obvious. Nearly all chitons are grazers on diatoms, micro algae, bacterial films, etc.