lakelady
Aside from the fact that you could be arrested for taking live coral from the ocean, that almost never works. Coral adapts very closely to local conditions of salinity, mineral content, temperature, food source, light patterns, and currents over decades. The colony is unlikely to survive the move. Still, I have known it to work. There are bars in coastal towns that break off pieces of coral and just toss them into the decorative tank. It seems to be cases of it works because they don't know it isn't supposed to. You need a license, an EXPENSIVE license to gather wild corals and fish from the ocean.
Tabitha
First, make sure it is legal to harvest the coral. Also, consider "fragging" the coral instead - just cut a piece off of it and leave the rest. In any case, check your local rules. Remember, do no harm.
And yes, they can have unwanted parasites, hitchhikers, and diseases. You should quarantine all new corals before adding them to the display tank - regardless of where you got the coral.
Colby
Please do not listen to the others posting. Clearly they are very ignorant about the subject.
All coral is from the ocean. There are exactly 0 corals that not from the ocean (originally.) Obviously, corals from the ocean and corals from captive sources have the capacity to introduce pest species.
So the answer is, maybe?
?
It's possible, though you're more likely to introduce some unwanted critters that way. You should quarantine new livestock anyways to watch for issues for a couple weeks at least.
If you have the proper permits and identify what you're taking, that is.