When a door at the top or the bottom of the stairs may be blocked by the rail of the stair lift, there are a number of stair lift models designed to overcome this problem. Some manufacturers are able to produce a rail with reduced overhang upstairs, so the stairlift will not protrude as far into the hallway. This may solve the problem at the top of your stairs and is a very cost effective solution.
If there is a door or passageway at the bottom of the stairs then it is likely that you will need a folding track or hinged rail stair lift. This means that the bottom section of the rail can be folded out of the way when the lift is not being used. This will allow you to gain access to a door that would be blocked by a normal rail and also means that there is no tripping hazard if you have an open hallway downstairs.
The hinged rail option is available from most suppliers but the cost and quality can vary greatly. Seek independent advice and consider if you would be able to fold the rail manually or if you would require powered operation. Most people do need the powered version as the mechanism can be quite heavy. Unfortunately these options will add to the cost of the lift.
The only other option is to stop the rail of the stair lift short, to prevent it protruding as far into the hallway. This might make getting off the lift dangerous and is not an ideal solution by any means. Again you must seek advice, preferably from an occupational therapist. Also take into account that while you may be able to use the stair lift this way in the short term you may find it impossible in the future. Some companies may not consider it an option as they feel there is too much risk involved.