"They went on holiday to France last year."
Translation:Ils sont allés en vacances en France l'an dernier.
According to this website here you can. It states:
However, note that an/année is far more flexible than the other pairs; for "last year" you can say l'an dernier or l'année dernière, "next year" can be l'an prochain or l'année prochaine, etc.
But you will find that even the French debate when each should be used here.