If the ship/yacht supports roaming, then yes. This means it's fitted with a satellite to link back to us, and cell transmitters to connect to your phone.
You can check to see if the ship/yacht you're on has this here: http://www.vodafone.co.nz/roaming/maritime-coverage/
You can also view the rates there, which can stack up if you're using it a lot. Also, maritime data roaming is being discontinued at the end of the month.