Hanging the rock upside down will make him detach. Aiming a powerhead at the foot might do it too. I have used the powerhead for a while, then once the clam started to move, I gently rocked it so the foot would withdraw and I cut the bysall filaments where they attach to the rock. The clam didn't mind a bit.
Be very careful. Make sure you don't torn the byssal gland, since you can kill it. Alternatively, you can try to chisel it out. They are not meant to move after they attached.
Can you remove the turf algae without detach the clam? You can take the rock with clam out of water if you can get the work done in a minute or two. It is definitely less stressful than cutting the filement and it need to spend all the energy to regenerate it again when it settle in a new place...