Ear infections are very itchy so while her ear may feel worse when your other pup is done licking, it does feel good to have someone itch it for her. Kind of like scratching a mosquito bite or poison ivy lesions until they bleed because they are sooo itchy. You pup is licking because she's a good friend and because she's attracted to the smell of the inflammation and exudate. Although it's gross to us she finds it yummy. Well worth a nasty look from the owners as far as they are both concerned.
Your licking pup won't stop licking until your other pup's ear infection is cleared up. And as long as your pup's ear is wet from licking the infection will be hard to clear. Also ear infections are usually secondary to something else. A polyp in the ear or allergies or a combination.
The pup who is being licked needs to go to see her veterinarian for an examination, an ear swab cytology to figure out what is growing in her ear so appropriate meds can be prescribed and a good cleaning of that ear. Once a diagnosis is made recommendations on what to use to prevent the return of the infection once it is cleared up can be made.
Ear infections often occur secondary to food allergies so discuss a hypoallergenic diet with your veterinarian, such as Z/D or CNM HA if this is a chronic problem.
They can also be secondary to inhaled allergies so antihistamines such as Benadryl or Atarax in combination with high doses of omega-3 fatty acids like 3V caps or Derm caps may help.
Sometimes just using a particular ear cleaner to change the environment in her ear and anti-inflammatory ear drops like Synotic may be enough.
Unfortunately your pups may need to be separated for a while when they can't be closely supervised while your pup's ear is healing.
Please let me know if you have further questions by replying to my post.