As someone who suffered from EDs for most of their teenage years, I can tell you the good news is that the chances are she'll grow out of it.
However, obviously you want to do everything you can to make sure she does get better.
Firstly, make sure that none of your language is challenging - anorexics/bulimics are incredibly competitive. Make sure that no one disparages her weight loss (i.e. say in front of her 'she's fine, she's not even that skinny' - that will just spur her on) or draws too much attention to it (this sounds harsh, but there may be an attention-seeking element to it).
Secondly, and this is linked to the competition element - if she has any slim friends, she may see them as what is known in modern ED terms as a 'thinspiration' and may be wise to limit her time spent with them if you can.
Thirdly, she will almost certainly be a member of a pro-ED site, and/or have a ED diary - this might be somewhere she writes down her daily calories intake/purge figures or where she collects images of skinny people she'd like to look like. If she has a computer, she will most likely have an obscurely labelled file of thinspiration-pictures.
I don't necessarily think that the gym membership is a bad idea, because through it you may be able to promote a healthy outlook to keeping fit. Tell her there's nothing wrong with keeping fit and healthy, and that exercise is a part of that, but so is eating healthy foods like salads and vegetables.
I'm not sure how this will help, but hope it can give you some insight!