Your question is both very easy and very difficult to address. Let's start with the misconceptions as they are easy.
1. Generally swimming is irrelevant to ear canal lining disease.
2. Commercially marketed "low allergy" dog foods are generally not rational approaches to the diagnosis and treatment of allergy, especially inasmuch as allergy is a broad family of distinct and overlapping diseases. Trying to sort that out without the help of a veterinarian leads to frustration, chronic disease sometimes with irreversible consequences and extra costs to the owner over the life of the dog.
Skin and ear disease workup require a rational approach. The signalment (age, gender, breed), the history (age at onset, seasonality, response to treatment) and physical exam findings (especially after compiling these over several visits) are the single most essential factors in developing a working diagnosis of skin and/or ear lining disease.
Management comes after.
Working up skin and/or ear lining disease thought to be allergic in nature first requires ruling out certain common parasitic or infectious diseases as primary (fleas ticks mites bacteria fungi)
If the dog has no middle ear disease and this is all outer ear canal lining inflammation and it has started in the third year of life and is seasonal, it is more likely environmental allergy than a food related allergy. That said, some foods have anti-inflamatory ingredients such as a proper balance of omega 3 and omaga 6 fatty acids that reduce generalized skin inflammation. In cases of environmental allergy, however, such an approach may be an adjunct but not a primary therapy. If instead the condition has been going on for 3 years and is nonseasonal it may well be a primary food allergy, perhaps with a superimposed environmental allergy. That possibility is tested with an "elimination diet." You will get that diet from your doctor, not a store as it is defined as a novel protein source.
Recurrent itchy ears or infected ears, are not simple, and you need a veterinarian competent in skin disease and who is a good communicator and who will persevere to help your dog. Allergies are not cured, therefore if your dog has a form of allergy, your dog will likely be dealing with it for life. It will be your foresight and proactive approach to treatment that will minimize future discomfort and cost.
Tell your doctor you want to pursue a diagnosis and if you are not satisfied seek out a board certified veterinary dermatologist (credential is DACVD).
the food costs more, but as the dog eats anyway, in comparison to repeated visits and treatment if it works, it will save money. The allergies if they exist will not be going away, so on balance you will be better off. Stay optimistic!
As for allergy tests, the gold standard is skin testing, however, for food related allergies these tests are not appropriate. They are used for environmental allergies (as inhaled or absorbed through the skin).
Staph infections of inflamed skin are usually secondary. they must be treated but are not the cause of the problem. Failing to address the cause will allow recurrence.
if your doctor believes a food allergy is in play, stick with the novel protein or elimination diet he/she has prescribed. expect an 8 to 10 week or longer trial. Figuring out skin disease is a process over time. Patience is in order.
If after an appropriate workup, seeking or being referred to a specialist dermatologist is reasonable. usually only the truly hard cases get referred: multiple allergies poorly responsive to appropriate treatment and that are properly diagnosed. Either way expect management, not sure.
Thanks- the vet prescribed him the special food, it costs a fortune. The infections are usually staph and get better quickly with treatment. I wonder if they can allergy test a dog- we might head to the specialist centre near us and find a dermatologist.