You'll want to use a cyanoacrylate based super glue. This is commonly sold as Super Glue Gel. A lot of people on here use the Loctite brand, but I use the Big Lots Special.
Cyanoacrylate is a moisture-curing glue. It requires moisture to cure, and will generally cure faster under water than in air. It also is an exothermic glue, meaning it will generate heat as it cures. In other words, don't dry the coral/rock completely, stick a smudge of glue on it, put it immediately back in the water, and then hold the coral in place for a few seconds for the glue to cure. The water will conduct and convect the heat away from the coral.
And that, my friend, is your lesson on superglue.
As for transferring the mushroom, I'd chisel off the mushroom with a small part of the rock. It makes gluing the mushroom down to its permanent home a WHOLE lot easier.