Does your rank in school matter?
Does what rank you are in your school or district matter?
I don't think it matters too much, considering half of high schools in America don't even use rank. The most it matters is to see how rigorous your courses are in correlation to your high school. If you have a 3.7 GPA but are ranked 50/100, the college might see the classes at your school as "easier" than if you had a 3.7 and were 5/100. Then again, that still matters a lot less than everything else on your application.
Your rank really doesn't matter. Colleges just like to see how well you do compared to other students. Even then, with a high GPA and other achievements you shouldn't worry about your class rank. Some schools don't even have class ranks.
Everything on your application is going to matter to schools, it's just a matter of how much weight a school puts on something like school/class rank. Class rank is used by schools because it offers a numerical representation of a student’s academic achievements in comparison to those of their peers. Essentially, colleges consider rank because they are trying to determine how you performed against applicants with access to similar resources as the ones available to you.
Many schools now look at applications with a holistic approach. This means schools are going to look at a variety of things while they consider if you should be admitted or not. While I don't want to speak in definitives, I don't think a low class rank would be THE reason you might not be admitted to a school. Just like I don't think a high class rank would be THE reason you get accepted somewhere. In reality your course rigor, GPA, ECs, essays, etc. will play the largest role and class rank may be used to tip the scale one way or another. If you're worried about how a low class rank may affect your application you may be able to talk about exceptional circumstances that caused your low rank. Keep in mind however that if these circumstances occurred during your sophomore year a school would expect you to improve your rank the following years unless the issue is ongoing.
You also might find these articles helpful: