As you have asked the question, the answer is yes, they can do that. Not because there is a law giving them permission, but because there is no law saying that they can't.
It isn't all that many years ago that for a high school student to have ANY choice in what classes they were taking was unusual. You showed up on the first day of school and were told, "These are your classes. Be there". You might get a choice between French and Spanish and you might get a choice of "college bound" or "business track". But that was about it as far as choice went.
Now, if you want to provide a few details, we can tell you what, if any, options you have.