Yeah, but it would be dry rock. But keep in mind coral skeletons are prone to fuel algae growth due to the phosphate leaching out from the skeleton. That is why when a coral dies, the dead skeleton gets covered by algae.
If the skeleton you had was in water for some time in that state, it should be okay. But if someone took out a live coral and sun dried it, it will have a lot of phosphate.