I think the worm might be a Ruffled Scaleworm (Arctonoe fragilis). This species of scaleworm is often associated with sea stars.
I was struck by how closely it matched the colors and patterns of the sea star — especially how the white spots along the sides of the worm matched the white tubercles (short rounded spines) of the sea star.
When the worm turned sideways along the side of an arm, you could see it if you knew where to look, but it was amazingly well camouflaged (see below).
Here are two more close-ups of the worm. I'm not sure if the "ruffles" visible in the next picture led to the common name, Ruffled Scaleworm?
Below, the worm's white head with its pointed, transparent appendages is facing left. It was fun to think about the scaleworm crawling among the sea star's spines like a maze.