Do cocktail onions need to be pressure canned
In canning, you can't make up your own recipes. There are too many "gotchas" which you cannot predict or measure. So while in principle yes, acid will make a low-acid food cannable in a water bath, just taking a recipe meant for other use and canning it is not safe. And you have to follow it exactly - if the recipe is for cut-up onion for example, you cannot use whole onions. 

There likely are recipes for canning pickled onions, look around for those, and try them out.