No!

It is not safe for your dog to have onions. Onions contain compounds like N-propyl disulfide which can lead to dangerous health conditions like anemia.