I don't believe so. Yahoo (as far as I can tell) only offers POP e-mail, not IMAP. And however they have POP set up, it's configured to mark e-mail as read on the web interface when a client downloads it.

Basically all Mail is doing is asking for the messages. Yahoo's servers are then also marking them read.