Don't sweat class rank - or anything else out of your own control.
Homeschoolers don't have ANY class rank, and so many kids now have non-traditional educational opportunities (homeschooling, unschooling, dual-enrollment, traditional high school, etc). The SA's KNOW your high school's profile, they KNOW how many kids go to top-ranked colleges, they know if you have only one or two opportunities to take AP/IB courses, etc. Just like they know if you are a football player from a top-ranked AAAA program and you sit the bench, or are a star player in your school where there are so few kids they have to play offense and defense.
Take the absolute toughest most advanced coursework available to you (including dual-enrollment at local U or CC). Don't worry if your school is #1 or #500. Because the SA's are also interested in what you do with what you have. Finding a way forward through adversity is definitely a skill they like to see.
So, class rank important? Sure. End all/be all thing to wring hands over? Nope.