Your vet can culture the ear material to determine if it is yeast or bacteria. Yeast is usually easy to tell however - it is dark and slimy/waxy with a strong odor. The healthy ear has no detectable odor at all, so this is easy to tell if you put your nose to it.
Grain free is a good start, but any food intolerance can create a yeast imbalance in the system so the key is to find out if there is something causing this intolerance. You can't do this on a processed food. You would have to start feeding a homemade elimination diet - starting with one protein and one non-protein for at least a week. Then adding one ingredient at a time that is in the dog food until you identify the problem.
If it is bacterial however, this can be general allergy - environmental for example. Many mistakenly believe there is a specific active infection - but bacteria can also easily grow out of balance if there have been antibiotics administered in the past, or other drugs that wipe out the system, without then the use of probiotics to replenish the system...alway s good to use probiotics like Primal Defense (Garden of Life) and I would recommend this as well given the situation.