I started pulling rock whenever I saw a eunicid worm retract into a hole. Then I put the rock in a bucket and squirted San Pellegrino (a carbonated water) into every hole. Carbonated drinks tend to be very acidic, some soft drinks have a pH as low as 2 or 3. When you squirt this into the holes, all sorts of things start bailing out, including these worms. You can't really pull on them, they will tear/break easily.
If you don't succeed in getting the worms immediately, leave the rock in a bucket of water with a small powerhead. I had a few that didn't come out immediately, but left the rock overnight. In short, don't put the rock back in the tank until you're sure you got the worm out.