Anecdotal, but I once dreamed an entire Wednesday. Got up went to work, a few hours in realised it was Wednesday all over again.
I suspect that one's mind can differentiate a dream from reality because dreams are not a simulation, they are not internally consistent or even generally comprehensible, while reality is.