I'm having a similar problem. I'm using Mail with a Microsoft Exchange account, The problem has existed with Yosemite and El Capitan (even after current updates). Some messages will not remove the "unread mark" even after being viewed or opened outright.
Example:
I found that quitting the Mail application and opening it again clears the unread status, however it shortly returns. A second solution I've found which works is to select or deselect the "Organize by Conversation" option from the view menu:
Doing this seems to work, but again, you have to toggle between the setting every now and then when the problem recurs.
I have some rules for sorting mail to folders in my Exchange profile, but the rules seem to be working fine, and those messages are often also stuck in the "unread" status. I don't think the "bug" has anything to do with rules.
I sure wish Apple would FIX THIS! as it seems to be a problem that has existed for quite a while.