When I read this it felt like the person who told you that had a reason to say this to you, but it wasn't something that would be brought up just from them seeing the conversation. Then I read the quote you wrote below and it made much more sense. They only mentioned it because the other person got mad that you seemed not to care about what they were saying. This person being their best friend was the one who they bitched about this to, which in turn... was brought back your way in that conversation. Remember, as the person's so called "best friend" they'd side with them and let you know about pissing their friend off and how...
The best thing you could have done was say just that, "well, she wasn't saying anything I needed to know and speaking about things totally irrelevant that I didn't need to know." It seems as though the person that was teaching you or whatever really must have noticed that you didn't want to listen to what she was saying because she actually did bring it up to their friend to let you know it pissed them off.
I'm more of a forward person in this type of situation though, I can read body language considerably well and if this were something that I noticed when talking to someone I'd bring it up and ask instead of just getting irritated and bitching to my friend about it later. In your case I would have said, is something wrong, or am I missing something. To which I'd hope you would say, "I already know what you're telling me... this is what I need to know....."
In the end I can see where you may have come across as rude to this person but if you had your reason to then I'd voice that to your friend who brought it up to you and let them know why... I'm sure it would make it's way back to their friend.
I also see a little rudeness about the way it was brought up to you though, there should have been a little more tact used in telling you about how you were being rude to them by not seeming interested. As it seems though, they brought it to your attention because they see you and the other person as their friends and would rather not have some crappy drama because the other person thinks you don't like them, so it was something they really felt needed to be brought up.
Or maybe I don't know anything and just felt like typing a bunch of words here. Oh, and this is just my take on it... I don't care about the Fe, Fi, Se, or wtf ever else here...lol