An infection will have a high fever. Teething won't.
Sometimes a teething baby will have a slighty higher temp than normal, but that is in response to the pain. Ever stub your toe or get hurt and feel hot all over?
There are threads in the health and healing forum that talk about ear aches.
My doctor once told me that there really is no way to see an ear infection, because it is usually behind the eardrum. If a doctor sees one, usually you will see it, too, because fluid and blood will come out of the ear.
For my children, I have always turned to traditional Ojibwe medicine, as I feel that has been around way longer than Western medicine.
For pain relief for both ear and teething I use alternating warm and cool washcloth behind the ears to help swelling and drainage.
Teething sometimes causes swelling that affects the drainage from the ears, so is often mistaken for an ear infection, because the baby grabs their ear to relieve pressure.
I also massage the ears and drainage areas to help fluid pass through.