It may very well have been the worm, but if it was then the clam wasn't healthy anyway (even though it might have looked fine). Bristleworms find their food by smell, and if it doesn't smell dead or rotten they don't know it's there. It's not unusual for a clam to look perfectly fine and then be dead the next day either.