No — garlic is even more potent than onions.
Garlic is in the onion family but roughly five times more concentrated in the compounds that damage dogs' red blood cells. Small amounts in some commercial treats are debated, but whole garlic or regular exposure risks anemia. Not worth the gamble.
If your dog already ate this, don't wait for symptoms — call your vet now, or the ASPCA Poison Control line at (888) 426-4435. Note what and how much was eaten.
Get the printable list of the 30 most dangerous foods for dogs.