Not realizing that something a friend told you was in confidence, you share the info with 2 other friends. Your friend is mad that everyone knows there secrect but has directed her anger to someone else - the person they mistakenly thinks they betrayed him or her. So do you reveal that you were the info leak ?
By not being truthful about your role, you stand to lose the friendship at a later date. You made an honest mistake by divulging information you didn't realize was confidential - this should be a forgivable error.
If you allow your friend to blame someone else, and unfairly cause a rift in their relationship or even cause it to end, you have lied by omission to your friend. When the truth comes out, and it usually does, you will find it nearly impossible to get your friend to believe the entire situation was caused by a misunderstanding on your part about the original conversation being private.
Ethically, I would say that yes you have to tell that it was you. If your friend just did not have a clue who did it and was mad in general, it would probably not do any good to tell her it was you.
But if your friend is mad at someone else and is going to treat that person badly, the whole situation changes. It would not be fair for someone else to take the "punishment" that you deserve. Therefore, in my opinion, you would have to admit that you are the one at fault in the situation you describe.
In general being truthful is the best option morally, ethically, and I believe even practically. But being truthful does not mean going about broadcasting truthful information to all and sundry. There must be a purpose in disclosing even the truth.
In this particular case, there appears to be good case for disclosing the truth. This is to prevent the relationship between your friend and someone else becoming soured. I assume that this will have negative consequences for both of them. If you can help them retain good relationship, why not do it? The other side of the issue is the possible blame you will face for having betrayed your friend. I believe that should not come in way of truth for several reasons. First if it was a genuine mistake on your part you should be able to explain it to your friend. Second your friendship might actually improve if your friend sees that you are truthful with him or her and are concerned about his or her relationship with others. Finally, if the friend is unreasonable and insist on blames you without justification, you need to examine the worth of such friendship.