You weren't wrong at all, Iris. You handled the situation perfectly.
Nine o'clock is nine o'clock. The instructor was very rude. Even if you had walked in a few minutes late, his remark would still have been totally out of line. You are an adult, and the presumption should be that you were unavoidably detained.
If you had walked in late he should have just continued his lesson as he walked over to your seat and given you the materials. Many instructors say "welcome" with a big smile to latecomers, but some people might be embarrassed by the extra attention.
I once had something a bit similar happen to me when I had to go to an out of town course that I had to do for my job. I don't remember why, but I had a terrible, convoluted, stress filled morning and a long drive, and I was sick with something or other besides.
I was late, and I tried to come in quietly and unobtrusively. The instructor saw me and made some sort of snarky remark in front of the class. I literally saw red but didn't say anything to him.
Instead, I just sat and took notes and listened for the whole day without looking up or looking at him. At some point he tried to come over and make a comment to me when we were doing group work, and I ignored him.
I'm sure that my behavior would not be ehell approved, but hey - I was young and clueless. Actually, several of the ehell phrases could have diffused the initial situation.