Yes you can, it isn't particularly dangerous. In my lifetime I've probably inhaled around 5,000 to 6,000 thousand cartridges from a whipping cream dispenser.
Don't take this as license to think it is ok to inhale 5,000 cartridges. The oils wind up getting into your lungs eventually and I don't use nitrous anymore because it fucks with my lungs. Sometimes I'll cough for a few days after. Not only that, nitrous oxide is neurotoxic in a variety of ways and may not be safe to abuse. Certain people seem more suspectible to this type of toxicity than others, but i suppose I am not one of them.
What's funny is that i never liked dissociatives, but I found nitrous to be like a opioid, benzo, dissociative and cannabinoid all rolled into one drug. Problem is you are not only starving yourself of oxygen, it can also through a particular mechanism cause the brain axons to lose their myelin sheaths and result in overexpression of glial cells in the nervous system causing essentially a miscommunication. But hey if i can remember the mechanism through which nitrous oxide exerts its toxicity perhaps those nitrous oxide didn't mess me up too much (that said this sort of toxicity wouldn't effect memory so much as it would the spine and muscles).
In short though yes its acceptable. Don't make a habit of it though.