You do need an undergraduate degree, but that degree can be any major of your choosing so long as you also fulfill the prerequisites for pharm school. Perhaps you misstated or mistyped what “you heard”…
You can find a lot of information on the PharmCAS site.