If you're a teenager and you are anorexic and lose your period, will you ever be able to have children?

Yes. Anorexia is a serious problem and if it has gotten to the point where you are no longer having periods this is a big deal. It is very important that you see an obgyn to help you. It is important that you are very honest about the eating disorder so the doctor has all the facts. It is also important to address the underlying eating disorder with an experienced counselor.
Yes. If you recover your health, gain weight, and get medical help with follow up, there is no reason you won't be able to have children.