All of the various tricks described can be made to work, and the simplest is probably to use a preframed exterior door backed up with a black curtain. (I've been using a surplus-store wool blanket backed up with a piece of black, fire-retardant-treated commando cloth for years).
But if you are going to install or replace a door, you might consider the safety aspects: in an emergency (fire, earthquake, injury) a door that swings outward is best, and a pocket door is possibly worst. I live in earthquake country myself, and don't have the luxury of an emergency exit, so when the "cloth door" gets replaced by something solid, it will probably have a styrofoam breakout panel installed in it so that I can get out even if the door is jammed.