Will an ear infection cause pain in the lower teeth?

Unrelated. I have never seen that happen in over 40 years of practice and while nothing is impossible, it is extremely unlikely. See your pcp or an ENT specialist for the ear infection and a dentist for the toothache.
It can. Pain from the ears is often referred to the mouth due to the proximity of the associated nerves.
No but. No but, pain in the posterior lower teeth (wisdom teeth) can cause ear pain. See ENT doc for "ear infection". If negative, see oral surgeon for assessment.