You are entirely correct, company policy, the law of the vessel's flag and the law of the port are what control here.
It is not unusual for merchant vessels to carry small arms, at least the captain will have a pistol if only to control unruly crew members.
I sailed on vessels under government charter, and we carried one each Mossberg shotgun, 9mm pistol and AR-15 for every crew memeber.
We were required to take a small arms proficiency course before signing on.
The arms chest was well secured with a key only for the Master and Chief Officer.
In port the arms chest could be sealed with a customs seal, just like the slop chest which contained un-customed alcohol and cigarrettes. Frgds, 3/M
Thanks for the validation. :-)
Seems to me that a few skilled crewmen with good long-range rifles could end this problem. :-)