A barnacle is a very weird crustacean that lives in a shell and sticks out a filter-feeding appendage at times and are harmless filter feeders. Do note that most barnacles in captivity will die due to not being able to feed enough.
I do not think it is a barnacle. It doesn’t have a hard shell and I’ve never seen anything inside the hole. It came on my Florida live rock that I’ve had for about 4-5 months. It’s hard to get a good picture of it because it lives in the dark under a ledge. I was able to get a pic when I moved the rock temporarily. It seemed to grow for a while but lately I think it is injured because a spaghetti work and in the rock above keeps spitting junk onto it which attracts my crabs to crawl on top of it and pick at it.