Of course a cannonball can float. But there’s a catch. The catch is that it depends on the density of the liquid or fluid you are putting the cannonball in. If the object is less dense than the liquid you are putting in, it will float. In fact, there is a planet that is less dense than water. Saturn. If you had a large enough ocean, Saturn would actually float in it.
But what liquid is dense enough (at room temperature) to allow a cannonball float?
Strange as it sounds, a cannonball will float in liquid mercury because the mercury is more dense than the cannonball.