Section 224(2) in The Naval Ceremonial, Conditions Of Service And Miscellaneous Regulations, 1964
(2)In the event of the ship commanded by the Senior Officer of two or more ships, who is not a Flag Officer, being wrecked or lost, such Senior Officer may direct himself to be borne as additional in his proper rank, in one of the ships under his orders; and while so borne, or until an officer senior to him shall arrive on the spot and otherwise direct, he shall have the same command and authority as he had before his own ship was lost.