When she was with Rory, Lane told her that she had to meet her science partner to work on an assignment; now we learn that Dean is her science partner. They are studying spores, moulds, and fungi, which suggests a Biology class.
It is notable that Lane is able to work with Dean, and is reasonably polite and even friendly with him. She doesn’t treat Dean badly because he broke up with Rory, as others have done, or seem to have any problem with him.
From her observations of both, she may have decided it is quite likely that Rory and Dean will eventually get back together and she prudently doesn’t want to be the person who made an enemy of her best friend’s boyfriend. (She even raises the possibility with Dean, suggesting it is something she has thought about).
Another possibility is that Rory has told her, or at least hinted to her, that it isn’t entirely Dean’s fault that they broke up, and that he didn’t dump her on a whim, or do anything horribly cruel to her. Lane does seem to understand that Dean is not a monster, and perhaps knows that Rory has trouble with commitment.
Rory walks in on Lane and Dean studying together, and having a conversation about her behind her back. She didn’t know that it was Dean who was Lane’s science partner, and doesn’t cope well when she finds out this way.