If you 'caramelize' an onion, does an onion contain sugar?
Yes, onions contain sugar, just like most fruit and vegetables. It is not simply a common phrase, it is true caramelization. 

They have 4.24 g of sugar per 100 g in total (wet weight). For dry weight 40% is sugar. See the USDA nutrient database for more details.