Would "En lektion" also mean a university lecture? I was just thinking that in English we use lecture, class and lesson which all mean similar but slightly different things. So is 'en lektion' a stand in for all those words? Or only 'A Lesson' ?
"Lektion" is sometimes used as a catch-all word to include any type of chunk-sized learning experience with pupils or students, so in some cases it can mean "lecture". Normally a university lecture would be called "en föreläsning" while, say, an exercise session might be called "en lektion", or something more specific to the subject like "räkneövning" (calculation exercise session). At least this is this case at my university. I don't think you should use "lektion" when referring to a lecture that is open to the public or aimed at, for instance, university staff, because it would imply a teacher-student relationship between the lecturer and the listener.
"Lektion" can definitely be used for "class", when you mean the hour-or-so long class, not an entire course.
In summary: yes, "lektion" can mean all those things, in some cases.