I had a conversation with the HR Director about something happening in my department. She went to my boss with the issue, citing me as the source. This was not an official complaint by me, as we were not in her office but in the lunchroom. However, I considered conversations with HR professionals to be in confidence. Was I in error?
HR people aren't doctors or priests; there's no confidentiality statute and you shouldn't assume confidentiality when talking to them, even if you're at lunch. Even if you're talking to them when you run into them at the grocery store over the weekend.
HR is there to serve the company; their loyalty and responsibilities are to the employer. If they hear information that they judge needs to be shared or used to address a situation, their job obligates them to do that. A parallel: Imagine you're a computer programmer and you learn there's a serious bug in the software you're working on, but you do nothing. You'd be being negligent and not doing your job, right? It's the same thing with HR.
Now, in some cases, you can talk to HR in confidence if you explicitly work out an understanding of confidentiality before you share. But even then, it might not really be kept confidential. I've seen plenty of cases where a HR person judged that the best interests of the company required that the information be passed along, even after promising confidentiality to the employee.
Additionally, there are cases where HR is actually required to report things, no matter how vehemently the employee requests confidentiality: They have to report any concerns about harassment or illegal behavior, even if you beg them not to.
Now, should it be this way? Is HR in the wrong to operate like this? The reality is, HR is there to serve the interests of the employer. To the extent that they also serve the interests of the employees, it's in service of the larger goal of serving the company. For instance, they may do work on employee retention or morale -- but that's because it's in the employer's interests to retain good employees and to care about morale, not because their primary "clients" are employees. And similarly, if HR hears about, say, an incompetent or struggling manager, HR's job is (generally) to find a way to address it. They can't remain quiet if that would violate their professional obligation to the company.
But there are good ways and bad ways of doing this:
Bad = letting an employee think something will be confidential but then sharing it anyway
Good = explaining to the employee that it can't be confidential and how the information will be used, and possibly agreeing to keep their name out of it to the extent possible (which may be zero, depending)
HR people (or managers, for that matter) who mislead employees about confidentiality not only are operating without integrity but are also pretty much guaranteeing that over time no one will trust them, respect them, or tell them anything.
But HR people and managers who are clear and direct about how they may need to use information -- and who don't promise confidentiality before knowing if they can really keep that promise, instead saying explicitly, "I can't promise you that I can keep what you tell me off-the-record; I don't want you to think something is private because I may end up being obligated to share it" -- are generally able to maintain trusting and professional relationships with those around them.
So back to your situation: Was the HR director in the wrong? It doesn't sound like you asked for or she promised confidentiality. You could definitely argue that she should have made a point of telling you that she would need to act on the information, but you could also argue that she assumed that was understood by virtue of you talking with her about it at all.
Overall, never assume confidentiality.