I am aware that this has been discussed before but it is clear to me that in certain cases “passer une année” can be used.
For example, on the web page https://acupoffrench.com/french-grammar/an-vs-annee-2/, which also explains when to use “an” or “année”, there is the following example with passer and année used to stress the duration:
“Elle a passé quatre années à chercher un travail.”
So I think it would not hurt to explicitly mention this possibility to use année instead of an to stress the duration.
For the general case (not just related to passer), I think the rule from “Advanced French Grammar”/Monique L’Huillier section 5.2.1 an/année is clearer than the “time unit” vs “duration” distinction: “an usually follows cardinal numbers, whilst année follows ordinal numbers, or an indefinite or demonstrative adjective”.
This rule does not hold for jour/journée, soir/soirée and matin/matinée and these cases are treated separately in the book.
This rule is then followed up in the book with “If the year is modified in any way, “année” should be used” with the following examples.
“J’ai vécu à Londres pendant cinq ans.”
”J’ai gardé un très bon souvenir de mes cinq années à Londres.”