Hello and welcome to iMore! We went on a cruise this past November. I don't think this is possible unless you purchase access to the ships wifi, which is pretty expensive.
As long as you have cellular data and a connection to your carrier or are roaming, you will be able to use WhatsApp. I have no earthly idea how the connection is though, in the middle of the ocean.