S-adenosyl-L-methionine-dependent O-methyltransferase that catalyzes the last step in the erythromycin biosynthesis pathway. Methylates the position 3 of the mycarosyl moiety of erythromycin C, forming the most active form of the antibiotic, erythromycin A. Can also methylate the precursor erythromycin D, forming erythromycin B. erythromycin C + S-adenosyl-L-methionine = erythromycin A + H(+) + S-adenosyl-L-homocysteine erythromycin D + S-adenosyl-L-methionine = erythromycin B + H(+) + S-adenosyl-L-homocysteine Antibiotic biosynthesis; erythromycin biosynthesis. Cells accumulate erythromycin C and its precursor erythromycin D, with little or no production of erythromycin A or erythromycin B. Belongs to the methyltransferase superfamily.