My wife has two friends who are involved in medical school admissions. They agree that the name of the undergrad school doesn’t carry much weight per se when evaluating applicants. However, there are two important factors in play:
The first is the selection effect. The Ivy+ and other top schools have screened for and selected very bright, highly driven students — students who tend to do very well academically and score highly in the MCAT. So, all other things being the same, they are already likely to be much more successful with medical school admissions.
Second, students at these schools also receive excellent advising, mentorship, unique research opportunities, and yes the brand name may open up more doors when they want to shadow doctors, gain clinical experience, etc. All these factors provide a big leg up.
So at least for this second set of reasons, where you go for undergrad can make a difference.