An aquarium-safe epoxy would work. If you are talking about live rock you can use nylon zip ties to hold them together. (Less chance of putting something dangerous into the tank.) Just install them where they can't be seen.
Why do I love fish? Because every time I stare into the little world I have created for them, every problem I have just floats away....