Deenroll? Unenroll? I understand words like cancel and resign would work, but is there an appropriate antonym with "enroll" in it?
Disenroll, "To cancel enrolment; to remove oneself from a list" may be the word you want.
It is in common use, for example as a bit of legal jargon for leaving an insurance plan:
A member may only disenroll from an MA plan during one of the four election periods noted above. ... When the date of death is unknown, the carrier may take action to disenroll the individual on the date...
If you are talking about what to do after you enroll in a class, but want to not be enrolled anymore, then you would
Enroll can also be used passively/transitively, e.g. you can be enrolled onto a medical register- in which sense the antonym could be "strike off".