Combat will always take place. If you are in a diplomatic relationship with another player, that relationship is broken the moment one player enters a hex occupied by the other player. This is covered on p11 of the rules:
Your Diplomatic relations stay in
effect until the end of the game, unless you attack one of the
players you have Diplomatic relations with, or they attack you.
Moving your Ships to a hex where the other player has a disc or a Ship
is also considered an attack. Both players then return the Ambassador
Tiles and cubes to the owner. The cube goes back to a Population
Track, chosen freely by the owner
There is no possible way to pass through a player's hex without any combat, because of pinning. p14 says:
If your Ships move into a hex, or out from a hex, containing other
players’ or Ancient Ships, at least one Ship per each opposing Ship
must stay (the Ship is said to be "pinned") and engage in combat in
the Combat Phase
So the only way you can move a ship through another player's hex is if you already have 1 ship in that hex per opponent's ship in that hex.