The man who slept with her must have left the dress for her before invading the facility and stealing the T-virus. All these happened while she is in the bath-room. It is the most possible way I can think of.
You realise Alice and Spence lived in the mansion, right?
in ther first film I remember Alice found the dress in the locker rather than the bed
in the third film, Alice clone found the dress on the bed, but it was all a set-up by Issac to emulate the Alice's Hive incident
I wish they put a game leading character inspired in Alice. Same name, same red-dress outfit (which I think is Iconic). Don't you think it'd be great AF?