Does someone need perfect grades to get into an Ivy League school?
No. But they are no guarantee of acceptance, either. You will need strong ECs, great recommendation letters, fantastic essays, and perhaps some national awards/recognition. Even then, it is a lottery… some win, others (equally qualified) do not.
@dscottvb is right. Good grades will definitely help your chances, but they make up only a small part of your application. Essays, recommendations, EC’s, etc. are much more important. And even then applying to the Ivy League is a crapshoot for everybody.