After the girl informed her mother about the incident, they alerted the ship’s security personnel, who detained the accused