Bullets are cheap.
But prohibited.
Private vessels/yachts don't arm themselves (unless you buy your own SEAL team and have it duly authorized to operate under international and national agencies) because they would be at risk for incarceration and prosecution by whatever court lies onshore. Most solve the problem by either avoidance or having a vessel with speed enough to outrun aggressors; that would mean more than 20 knots in blue water seas.