When was the tick removed? It may or may not have anything to do with the white flaky discharge in her ear.
The white flaky buildup is an indication of an infection. It can be a bacterial or yeast infection. Since your dog is in discomfort (moaning and shaking), I suggest you take her to the vet. They can do an ear cytology, and take material from her ear and look under the microscope. This will tell you what kind of infection she has. Then, the vet will prescribe a medication to treat the problem. You will also need an ear cleaner, which the vet can get for you as well. They will show you how to clean and medicate the ear.
Since you know there are ticks in your environment now, you should also address that. You should put a monthly flea/tick preventative on her. The best one is Frontline Plus. It will prevent the ticks from staying attached and engorging on your dog. You should be able to get this from your vet, but it is sold online as well.
Let me know if you have more questions.