If it’s a fossil it could be a coral. It could however be an igneous rock like pumice. Test the rock with some weak hydrochloric acid (also called Muratic acid dilute to 5 percent. If it fizzes it’s more likely to be a fossil.
Also check with a museum or school.