While I was fortunate to have that option, such programs are not always available. So, if you find yourself without access to such a program, I recommend reaching out to local cancer support organizations, particularly ones for teens/young adults. It is possible they may have volunteers that are retired teachers, or simply volunteers with education credentials, that may be able to help you with keeping up with classes. Extra communication with teachers at your school is also important in such a case too because they can help to adjust your work or develop an altered education plan for you.
I think education is essential when going through cancer treatment because it provides an outlet for you to channel your mental energy (since you probably won't have much physical energy) and, most importantly, it is the greatest tool you have to set goals and a direction for your life after treatment.