The suits wouldn't need to be air
tight in order to provide pressure. Just tight
. A little hole here or there would not matter much. Just add a separate means of protecting the face and the hands from the lack of pressure, and some source of breathing air, and voila.
In order to be useful as protection, these suits would also have to feature some sort of thermal regulation, though. But we already saw such a thing woven into the TOS uniforms, as per "Spock's Brain", so it's no doubt available in the TNG clothing as well (probably all clothing, including civilian attire).
But a separate helmet would be an absolute necessity in turning the standard uniform into a useful survival asset. And if one can reach a helmet locker, one could probably also reach another type of Star Trek gadget: the life support belt of TAS fame. Much more practical than mechanical helmets and tight pajamas in protecting you from vacuum...