I think you two are somewhere between being friends/networking buddies and being competitors. You want to help her (so you share a lot of info including the questions you were asked) and, if I understand you correctly, you even told her the job is better suited to her (or did you just tell us that?) - yet you get mad if she pursues it. You probably didn't want the job, but you are understandably flattered that your application got kicked up to the next level.
Your friend is also a bit competitive because, instead of supporting you when you said you flubbed the answers, she bragged that she would have nailed the questions. You probably told her the questions so that she would reassure you, but you wound up giving her the info - sort of like telling a study-buddy classmate in another section what was on the test.
If you gave her all this info, I don't see why she should notify you that she plans to apply for the job. You gave her the impression that you didn't do well and perhaps even that you weren't too psyched about the job. If she really wanted to hide the visit from you, she would have called the company for directions instead of you. I'm not sure why she needs an "invitation" from HR to drop off a resume, unless the job was not publicly posted and she could only have found out from someone else, like you. Lots of people drop off resumes all the time.
I think the two of you should either talk about this and square it away, or resolve to not discuss details so much. You are either friends or competitors, and it would be best if you decided. That way you will know how to proceed in the future and will not be nursing these hard feelings.