Can a two week old baby use the erythromycin eye ointment for eye discharge?

Yes. But most children with eye discharge at this age would benefit more from massage: http://emedicine.Medscape.Com/article/1210252-overview.