Anorexia is psychological, and a product of body dysmorphia. People who lose weight from chronic illness, without the dysmorphic component, are suffering from cachexia. Two totally different things.
Cannabis shows no sure-fire impact on anorexia. Anorexic people may have a physical impulse to eat but their psychological state prevents them from seeking satiation. They have a fear of gaining weight and no matter how thin they get they still believe they have a weight problem. They may binge eat and then purge, or not eat at all. I think like any mental disorder, pot may alleviate or exacerbate. Depends on the person and how they utilize the high.
People with cachexia may have an appetite but be incapable of absorbing food, or have other impairments. Or they may have no appetite, due to treatments, or other reasons. Either way they don't have a dysmorphic disorder -- most people with cachexia find the loss of appetite and body weight to be alarming. (I went through it in May of this year. I was eating approx. 2000 calories per day but lost all my body weight to death camp proportions.)