if you want to separate the clam completely from the rock then there is no safe way to do it. you would have to cut the little strings that come from the clam and thats really harmful to it. i would go with reefman's suggestion and break off the part of the rock thats not connected with those strings and try to get as much rock off as you can
take a sharp clean razor and cut the string looking part closest to the rock... But do not pull it off or at all.... For next time put a frag disk under it and onto your sand bad