Will taking methatrexate affect my ability to have children?

No. Although Methotrexate (mtx) is a type of chemotherapy, it does not deplete the egg supply the way other chemotherapeutic medication can. Mtx has been used for nonsurgical treatment of ectopic pregnancies for more than 20 years, and the data in this regard are very reassuring. The standard recommendation is to wait 3 months to conceive after treatment with mtx but otherwise there should be no issue.
Fertility & chemo. The answer to the question depends, as does the response to any toxin, on the dose response effect. Meaning that the higher the dose and the longer that it's given the greater the chances that it will effect germ or reproductive cells ie. Sperm or egg. Meaning a reduction in fertility potential.
One time or longer? Methotrexate (mtx) is the 'best' treatment for ectopic pregnancy, but the pregnancy still damages the tube and disease may have damaged the tube first and affected fertility. Mtx alone as chemo (molar pregnancy) is one of the least toxic to future childbearing but combined chemo is worse. Mtx for rheumatoid can affect male/female fertility, cause miscarriage, birth defects. Stop mtx before trying.