Yes – chickens can actually eat onions in moderation. In small quantities and on the rare occassion it should be fine for a chicken to eat onions. However there could be some negative side effects that you may not like.
It is a common myth that you should never feed onions to a chicken because it is bad for their health. Only in larger more significant quantities are onions actually dangerous for a chickens health.
In large quantities onions can cause hemolytic anemia, aka: Heinz anemia. This is a blood condition that affects a chickens legs making them weak and gives them a disheveled appearance.
However if you do not plan on giving your chicken a bowl of raw onions they should be fine.
But on the other hand it is important to note that if you were to feed onions to your chicken it can also give an awful taste to foods they produce such as eggs. Therefore it may not be ideal to feed onions to chickens at all.