To be quite exact, et øl refers to a brand or type of beer (et lettøl- a light beer), while en øl refers to a portion of beer, like a glass or a bottle. Most Norwegians would, however, mix it up, so I wouldn't worry about it. They are both correct.
Good to hear Norwegians mix it up too since the previous question where this appeared someone gave a similar answer about how et øl refers to beer itself and en øl to for example a glass of beer. So I kinda was mind boggled what when to use especially in a context of drinking it.