Is anorexia something that is hereditary, can I pass it on to my children?

Genetic Influence. There are possible genetic risk factors involved with anorexia, but genetics do not explain the whole picture. It is by no means guaranteed that your children would have anorexia because of your own experience.
Increased risk. Several studies have shown that a person who has a first degree relative (parent, child, sibling) with anorexia nervosa has about a tenfold greater chance of developing it themselves than a person without such a relative.
Maybe. Most cases of anorexia are subsets of anxiety disoder/obsessive compulsive disorder. These are inheritable conditions. But the symptoms may vary and not present as an eating disorder in an offspring, but as another condition. It is not guaranteed that you will have a child with anorexia if you have it yourself.