Can an undergraduate write for a graduate-level course?
Although rare, this is possible. However, you would be well-advised to speak to the instructor who teaches the particular course as soon as possible before writing your essay; you will need permission from the specific program. Because additional advanced work is often required for graduate students, you may be asked to demonstrate skills and knowledge of a more advanced level than would normally be asked for from an undergraduate student.