If its dropped its byssal threads it had attached previously, it's trying to move to a "better" location. Have you changed anything recently? lights, flows, neighbors, etc? Any of these couldve caused the move. Nothing major to worry about though. Just let it find a good home and leave it be.
I have seen clams stabilized with a short PVC ring cut from tubing. This is not too ugly if you cannot find a niche in the liverock. It is anemones I find hard to homestead. Obvously not helping you, but the juvenile should have been sold already settled onto a rock chip.