These can be really frustrating.
First thing is to make sure it really is an anal sac problem. I've seen severe flea allergy with minimal evidence of fleas acting like this. There can be rectal problems and sometime the licking becomes like an OCD problem. The fact that you got an abnormal discharge the first time leads me to think your evaluation is probably correct.
If it is anal sac, I like to instill an ointment (like panalog or otomax) into the gland. It can be done with no sedation with a cooperative dog. A blunt needle (no point on it) or a curved tip syringe or other similar device is threaded into the external duct and the material injected into the gland. This treats infection and the cortisone in the ointment reduces inflammation and itching.
Keep talking with your vet, you should be able to figure something out :B
Doug, DVM