You have to respect her autonomy and privacy. Ultimately, you can't force anyone to get treatment, especially not for something like an eating disorder. That said, you can try to talk her into it. The best physicians I know will sit next to their patient in a private, calm setting (maybe even handhold) and tell the person what the problem is, what needs to be done, and what will happen if they don't (nonthreatening, though). If your friend refuses, you can then look completely disappointed, deflated, etc. as you let them go.
Philosophy aside, there's the matter of practially answering the question. The important thing in answering one of these questions is to repaint the lines so you have a winning option. Your physician-interviewer purposely distorted the playing field by giving you the options "betraying her trust" vs. "getting her help", either of which are bad. Those aren't really the options. You're options include 'getting her help by keeping her trust'. In fact, 'betraying her trust' is likely to backfire, making 'getting her help' impossible.
When I had a question like this, I'd smile and say something like, "That's a very interesting question. [pause, looking thoughtful] I don't think those are the only two options. If I 'betray her trust', I'm likely to blow any chance of helping her. Her trust is precisely what will allow me to help her. That said, she's an adult who will, ultimately, make her own, autonomous decision. I would [describe plan]." The interviewer answers, "And what if that doesn't work, are you going to let her die?" To which the reply is, "Anorexia has a very high mortality. While we can take appropriate action, we can't save everyone. That she is my friend would, of course, make this very difficult to accept, but I might simply not be able to help her."
Best,
Anka