Middle School Students can take an Upper School Course, however there are some important things to note.
One thing to keep in mind is that the Upper School course cannot appear on the Middle School Report Card, so the MS Student would have two report cards - one US Report Card for the US Course, and one MS Report Card for the MS Courses.
Alternatively, if you want Middle School students to have one report card, you can create 2 Courses, one for the US Course (which will have US and MS Students in it) and one for the MS Course (which will only have MS Students in it). In order to display the grade on the MS Report Card, the Teacher would record the MS Student's Report Card Grade in the MS Course. The Teacher would manage daily assignment grades the US Gradebook only, and the Teacher would record the Report Card Grade in the MS Course manually by selecting the same grade recorded in the US Course.
If you also need to display MS Grades on the US Transcript (for example, to show credits for US Courses that the student earned during Middle School), the Teacher would Record the Grade in the US Course as well as the MS Course.