Better to avoid
Best avoided. The flesh of a cherry is not toxic, but the pits, stems and leaves contain cyanide compounds — and the pits are a real blockage risk. The hassle outweighs the benefit.
A single de-pitted cherry now and then will not poison a dog, but cherries are more trouble than they are worth. The pit, stem and leaves contain cyanogenic compounds, and a chewed pit can release small amounts of cyanide; more practically, swallowed pits can lodge in the gut and cause an obstruction, especially in small dogs. Maraschino cherries swing the other way — no pit, but loaded with sugar.
We would not offer cherries deliberately. If your dog snags one or two whole cherries, watch for choking and signs of a blockage over the next day or two; if they raided a whole bowl of cherries with pits, call your vet for advice.
Far safer sweet fruits include blueberries, strawberries and seedless watermelon.
General information, not veterinary advice. If your pet has eaten something potentially harmful or shows symptoms, contact your vet or an emergency clinic immediately. Full disclaimer.