Actually, I misunderstood the problem. I thought it was stuck to a rock and moving along the rock.
I have tried sewing them on with cotton thread, but haven't had much success that way. Probably had more success with a thin rubber band
Best success has been to float or hang a small container, like one of those fry-savers they use for live bearers (guppies) and position it in the tank with small rocks or frags inside. This creates a low-flow area, but with lots of light. Simply sit the ric on top of a rock or squashed between a few small rocks and it will bond).
I used one of the rigid plastic fry-savers and I have some foam around the outer edges so the thing floats by itself.
Some of those two-dollar shops, even Spotlight, sell clear acrylic containers with suction plugs that are meant to hold soap in the bathroom. They have holes in them. One of these will do as long as you can get it to hold on.