Unpopular opinion, but YTA. your gf is not employed by your company. she does not have to adhere to your company’s dress code. you were out of line.
she was likely disappointed because she thought she looked better in the shorter dress. but you instead reinforced your company’s sexist dress code (yes most dress codes are sexist) to be a stickler for rules, instead of making your gf feel beautiful and confident on the day she’s doing a guest presentation at your job.
you literally say at the beginning of the letter that her job doesn’t require a dress code. so why is it that you think it was okay to force her to adhere to your job’s policies for one day? what would’ve happened if she wore the shorter dress for her seminar? they can’t fire her, she doesn’t work for them. did you think they would’ve fired you for clothes that you didn’t put on your body? let me get you a trampoline for that leap of a conclusion.
unless it was blatantly inappropriate like genitals being exposed, she more than likely would have been fine with her preferred option, and you probably ruined what was a special day for her. I’m sure she was super excited to be involved in your career.