You do need a prescription to be able to buy it so there is no way to get it without a vet's cooperation.
I would also rather get to the bottom of the ear infections. They are generally a symptom of some thing else happening, possibly some sort of a food sensitivity (not necessarily an allergy). Chronic ear infections can often be resolved through diet changes and homeopathic ear cleansers.
Surolan works well on some dogs (not all) but it is just a $30 band aid. The problem that is causing the infections is still there, you're just dealing with the symptoms. It is unfortunately much easier for the vet to just have you continue to come in and buy the Surolan (not to mention they can charge you for the visits) then to actually spend some time trying to cure your dog.