In general, garlic pills are safe for cats in the treatment of ridding fleas, however avoid giving raw garlic cloves to your cat because it can cause mouth sores or ulcers, and in some instances can cause anemia.
In my opinion the answer is no, don't give a cat garlic even though you may find that some people give it to their cats to prevent or get rid of worms and repel fleas. My cat got sick when I used it. See your vet for the best information.