New Zealand is a party to the Geneva Convention which says-"
Parties to the conflict shall ensure that burial or cremation of the dead, carried out individually as far as circumstances permit, is preceded by a careful examination and if possible by a medical examination, of the bodies, with a view to confirming death, establishing identity and enabling a report to be made. One half of the double identity disc, or the identity disc itself if it is a single disc, should remain on the body.
Bodies shall not be cremated except for imperative reasons of hygiene or for motives based on the religion of the deceased. In case of cremation the circumstances and reasons for cremation shall be stated in detail in the death certificate or on the authenticated list of the dead.
They shall further ensure that the dead are honourably interred, if possible according to the rites of the religion to which they belonged, that their graves are respected, grouped if possible according to the nationality of the deceased, properly maintained and marked so that they may always be found. For this purpose, they shall organise at the commencement of hostilities an Official GravesRegistration Service, to allow subsequent exhumations and to ensure the identification of bodies, whatever the site of the graves, and their possible transportation to the home country. These provisions shall likewise apply to the ashes, which shall be kept by the Graves Registration Service until proper disposal thereof in accordance with the wishes of the home country.
As soon as circumstances permit, and at latest at the end of hostilities, these Services shall exchange, through the Information Bureau mentioned in the second paragraph of Article 16, lists showing the exact location and markings of the graves, together with particulars of the dead interred therein."
This requires that all war graves are respected, and bodies in a ship would be protected.