From page 7 of the rules.
12.82 Retreat Direction. Units must retreat, if possible, in a direction indicated by that side’s retreat compass. They may retreat in any other direction only to avoid elimination due to enemy ZoCs and impassable hexes or hexsides (including the edge of the map). The owning player determines the route of retreat.
I interpret this rule to state that a retreating unit must always go in the direction indicated by the retreat compass for every hex moved in retreat unless blocked by an enemy ZOC or impassable terrain.