The short answer: No.
The long answer: Whether they’re raw, cooked, or in powder form, onions should never be eaten by your dog because they contain large quantities of sulfoxides and disulfides that are known to be poisonous to dogs. If accidentally consumed by your canine pet, onions may cause gastrointestinal irritation or may damage his red blood cells—resulting in hemolytic anemia and methemoglobinemia.
What to do if your dog accidentally eats onions: Contact your vet immediately. Observe him and look out for signs of pale gums, lack of energy, and anemia.