Garlic contains sulfoxides and disulfides that can be toxic to certain animal (i.e: dogs).
So, I would say no unless you are sure that chameleon can metabolize garlic.
I know someone who used to use it with uromastyx but I don't know if it would hurt chameleons or not.
http://www.zhealthinfo.com/parasites.htm
"Garlic by itself can be of great assistance in controlling parasites. Garlic has a history of being able to kill parasites and control secondary fungal infections; detoxify and gently stimulate elimination; it also has antioxidant properties to protect against oxidation caused by parasites' toxins. "