I'm going to tell my friend's parents that she has an eating disorder
Oh really? Is there a reason you feel like you need to tell them about this?
She needs to get help.
Understanding that she needs help is a great thing. Eating disorders are serious and life threatening so you shouldn't feel bad about telling her parents. She may feel hurt that you went behind her back but it's better for her in the end.
It's okay! We're best friends so I can tell her secrets.
While it's a great idea to tell her parents this secret in general you should try your best to keep secrets. In this case you could be saving her life as she has put herself in a dangerous situation and that's a great thing. But unless the secret is of this magnitude then you should try to keep it to yourself.