Mmm, I don't think the school you attend is important in terms of prestige. And I also think that anyone has the potential to succeed anywhere. You just might be helped along the way by the school you attend, in different ways.
Definitely agree with what Calebark said - school culture and environment is a big thing - I think that having a good environment, one that is conducive to learning (supportive teachers and students, minimal class distractions, resources, etc.), is really important.
I went to a private school, and am extremely thankful that I had the opportunity to. I came from a (state) primary school where I was bullied by my peers for being serious about education, and ostracised for being a more bookish kid. I went into high school, and I was suddenly in a place where my peers also wanted to succeed, and had an overall more positive attitude to education. I finally felt like I belonged somewhere, and I had friends that I could share my results with and they were genuinely happy for me. I had the resources to be extended in my subjects, and I had the teachers that took the time to make sure my learning needs were being met. I also got to participate in so many extra-curricular activities, which really helped develop me as a person - which is a really underestimated thing. Helping me develop as a person let me learn how to be part of a community, and just how to be a more wholesome person in general.
My school gave me opportunity. Which is important
As an aside - I was glad I didn't go to a selective school, as although my school expected us to put in effort, they never put pressure on us results-wise, and from day 1 of year 12 they drummed it into us how they cared about us, not the numbers we got at the end of the year. I felt like if I went to a selective school, I would have had pressure put on me about results, which wouldn't have been beneficial for me.