Yes but. If the fish bump into them, there could be injuries. They will not stay white. They will dissolve over time (very slowly, but in case you want them to be intact 20 years from now). They will help buffer and may raise pH.
Since there are more and more regulations about buying real coral, you may want to preserve your natural specimens and use coral made of resin or another decor item instead.