The rank of your school changes each year (although many schools do stay about the same each year) the new ranks are done AFTER your cohort's results are finalised.
So rather than the rank of your school affecting your ATAR and marks it is the other way around - you and your cohort's results determine your school's rank.
Because somebody who's coming 1st in all their classes a school ranked 500th isn't necessarily going to get 99.95 purely because their first. I went to a low ranked school and there were a few people who came first in all their subjects, but the cohort was very spread in their marks.
Coming first at a school that consistently performs well, ie. James Ruse, is more likely to help you because your entire grade will help bring you up.
The school ranking doesn't actually AFFECT your atar, it just determines the strength of your cohort compared to other schools and provides a good indication of the typical range of marks your school receives.
when i read atar estimate things i just think of it as, coming first in chem at james ruse, sydney boys etc is veryyyy different to coming first in chem at a school in the 500's or something, so it can give a better idea to those estimating of how your internal marks will translate in externals.