That is the flower bud. Clip it off and eat it.
Many onion growers clip the flower buds off as soon as they see them. The problem is that an onion that has sent up a flower shoot will not store well whether you clip the bud or not. That big heavy leaf that the bud ls on goes right through the center of the onion and makes it susceptible to rot. Eat those first.
It is common to get flowers on onions grown from sets. The small sets about marble size, are not as prone to flower as larger sets.
Gardening at 5000 feet elevation, zone 4/5 Northern Utah, Frost free from May 25 to September 8 +/-