Sure, why not. This is what the DMG says. Note that shooting at a moving, nimble monster may be harder than a slow moving boat that is a big target.
[ +- ] Cannon
Large object
Armor Class: 19
Hit Points: 75
Damage Immunities: poison, psychic
A cannon uses gunpowder to propel heavy balls of cast iron through the air at destructive speeds. In a campaign without gunpowder, a cannon might be an arcane device built by clever gnomes or wizardly engineers.
A cannon is usually supported in a wooden frame with wheels. Before it can be fired, the cannon must be loaded and aimed. It takes one action to load the weapon, one action to aim it, and one action to fire it.
Cannon Ball. Ranged Weapon Attack: +6 to hit, range 600/2,400 ft., one target. Hit: 44 (8d10) bludgeoning damage.
Big thing to note: it takes 3 actions to fire (load, aim, shoot), and the crew knows they will die to any hit from this thing and thus is very unlikely to help, so could be worth it, but only if you feel you can't help otherwise.