Mostly avoid — the pit is the real danger.
Avocado flesh contains persin, which is only mildly concerning for dogs in small amounts. The real dangers are the large pit (choking and intestinal blockage) and the high fat content, which can trigger pancreatitis. A tiny taste of flesh is unlikely to hurt; the pit never should be in reach.
Proceed carefully and follow the guidance above. When in doubt, skip it — there are plenty of unambiguously safe treats to choose from.
Get the printable list of the 30 most dangerous foods for dogs.