In a canister with Co2 I've made everything from a frothy soup or sauce, to simple crème chantilly, to airy foams that are on the palate for a single second and disappear completely. The type of gas you whip into a foam is unimportant. BTW, with a hand-held emulsion blender you can make a foam very easily (not just a froth) - you hold the blender so half the blade is above the top of the liquid, this incorporates air into the liquid and the foam will form on top of the liquid, then you scoop it off. We use all these techniques on a daily basis, they do work.
Anyhow, back to the original question. A foam will form if theres enough 'structure' to trap air molecules. A very easy way to make a foam is to add gelatin to a liquid, and then pop it into a Co2 canister. The amount of gelatin required is dependant on the viscosity of the liquid, and the temperature at which you are serving it (hot foams require more gelatin).