Slice a thin layer of rock underneath the polyp. Do this in a small tub of tank water.
Glue this to the new rock using crazy glue gel. Helps to pat dry first with paper towel.
Place in the tank in an area of low flow for a few days.
Wear eye protection and gloves. But before you do anything research palytoxin.