Can I compare just some grades to see if they are statistically significantly different from one another? I have grades of 25 students (for one test/exam) according to the German school system. The possible range of these grades is from 1 (very good) to 6 (insufficient). From my sample, 20 students got the grade "2", four students got the grade "1" and one got the grade "3". Since I know the range of possible grades (1 to 6 - whereby the true distribution is unknown), it must be possible to tell, whether these 25 grades are statistically significantly different from one another.
I can calculate the variance of these 25 grades and compare this to the possible range of grades. But now I would like to test, whether the individual student grades are statistically significantly different from one another.
In the associated exam, students could score between 0 and 100 points. Can I also conduct a test here to check if the scores of the 25 students are statistically significantly different from one another?

I think this is a misunderstanding of what statistics does. You cannot in any meaningful sense do a test to state that student X's grade in one test is significantly different from student Y's. Statistics tends to be about generalising from sample to population, and a sample size of 1 per category (i.e. student) will in almost all cases not allow you to conclude anything meaningful about differences between categories/populations.
I say almost always because we can imagine situations in which a single data point can overturn our expectations. But without a strong expectation (or Bayesian prior) that can easily be refuted by a counterexample, one data point doesn't tell you enough to conclude anything meaningful about differences between categories. This is because you have no data about the variance in each student's grades. You might be able to use prior expectations of this variance, but this is entering complicated territory; I wouldn't use that approach to compare the scores of individual students anyway.
