The rule you are stating is only for offloading during non-combat phase (it means if your transport does anything during combat phase, it can’t do anything during non-combat phase)
During non-combat phase, Transports can go to any friendly or neutral sea zone, whatever the alliegence of the coastal territory(ies). Also in non-combat phase, transports can only offload in friendly territories.