Hello & welcome, I am Dr. B, a licensed veterinarian and I would like to help you with your wee one today.
Now when cleaning dogs ears without an examination to ensure the ear drum is intact (and that any treatments don't harm the middle ear), we do have to be careful.
Therefore, it is ideal to just flush the ear with luke warm water or saline (OTC first aid eye
wash or plain contact lens solution). Both are safe for the middle ear if vulnerable and the latter can help address any minor bacterial infection that may be lurking out of sight. After doing so, make sure to use cotton balls or cotton wool (no Q-tips since this could rupture the ear drum) to absorb as much water as possible.
As well, if you suspect the head shaking is related to allergic irritation, I would note that you can try her with a low dose of Benadryl (Diphenhydramine) today. Of course, you do need to speak to your vet first if she has any pre-existing conditions but often we can give these wee ones 0.5- 2 mg per pound (1 -4 mg/kg) orally twice daily to help soothe irritation. Do note that we can see drowsiness and sedation with the higher end of the dose (just like people). Though if she is very agitated, this may not be a bad thing for the moment and could help her to settle. So, this would be something to use to soothe that irritation.
Overall, with head shaking and mild ear signs, we'd be most concerned about an irritation or possible foreign material trapped in her ear. Therefore, you can try the above to reduce that irritation and try to flush out anything hiding in the bottom of the canal. If you try this and she doesn't settle over the next 12-24 hours, then we'd want your vet to examine deep in the ear with their otoscope to see what is triggering her signs. Depending on their findings, your lass may need a course of ear medication. Or if something is trapped in the canal that flushing couldn't remove, then they can remove it for her.
Please take care,