Research has demonstrated that your suspicion is at least partly correct. Generally, formula fed babies get more ear infections than normal, and some are attributed to cow's milk protein allergies (even professional singers avoid dairy when they need to sing, it creates a lot of mucous), but yes, lying down and drinking has been shown to be problematic.
The eustation tubes in your baby's ears are very short and very narrow - immature, in fact, just as they should be. These short, narrow tubes are easy to fill with mucous which is a problem alone, and when they get anything else in them are far more likely to create the perfect conditions for infection.
You may not experience a different in how susceptible she is to ear infections by sitting her more upright to eat, but it will at least keep the foreign substance (formula) out of her ears, which may at least diminish what the bacteria have to eat. If she's sensitive to the protein, she's going to have more ear infections than normal, no matter what treatment is sought for it.