i would do a large water change (about 30% ), set your skimmer to skim wet for a couple of days and run some fresh carbon just to make sure. the worm you saw was a bristle worm, and it was likely there cleaning up the dead or dying matter of the clam. if they both went at the same time, it could have been a water parameter or a disease - hard to say for sure.