The reason I am asking is because I was playing Sid Meier's Pirates recently. In that game a naval officer is given the ranks of Major and Colonel before being promoted to Admiral.
Was there a common policy in some of the navies at the time to give an honorary Army ranks as a source of prestige?
Yes, this was a thing that happened, at least in the British navy. Generally speaking, though, the rank that would be given to a naval officer (as a sinecure -- there was not real work attached to it) was Colonel of Marines.
In general aboard ships, the commanding officer of the Marine unit was a captain, who was breveted to Major to avoid there being more than one captain aboard the ship. I can't speak to other navies, but from what I recall about playing Pirates is that the rank you got on retirement was a bit related to your achievements in game, so a rank of major on retiring could easily have been a game mechanic.
I wrote more about sailors and Marine units here: