Of course it's feasible.
[![enter image description here][1]][1]
Fantasy reference aside, I'm not aware of any real-life mammals that can do this.
If you wish for an evolutionary reason for one of your fantasy creatures to have this ability, I would go with the following reason:
It's normally small, usually swallowed whole by predators, and expands when it's inside.
This would allow it to choke the predator, and would crawl out once it was dead.
As for what it would require anatomically, I would recommend spines, and a separate set of 'lungs' present just below some stretchy skin. Separate 'lungs' are necessary so it can stay inflated while breathing normally. [1]: https://i.sstatic.net/jkGFX.jpg