The natural, everyday way to say this is "I need to be excused from class."
If the student didn't mention this to the teacher, one can imagine a conversation like this:
Teacher: "You were absent yesterday. What's your excuse?"
Student: "I had a doctor's appointment."
Teacher: "Do you have a note from the doctor?"
Student: "Yes, here it is."
Teacher: "That's a valid excuse. Ok, I will excuse [S pronounced like Z] you this time. But in future, please come to me before the appointment and get permission first."
So we have the noun "excuse," with the S pronounced the normal way. It can mean either the reason (the doctor's appointment) or the permission. And we also have the verb "to excuse," meaning "to give permission," with the S pronounced like Z.