If a door at the top or the bottom of the stairs may be blocked by the rail of the stairlift, there are a number of models designed to overcome this problem. Some manufacturers are able to produce a rail with reduced overhang upstairs, so the lift 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 stairlift. 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 above video shows the operation of the Stannah powered hinge on a straight stairlift. 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 stairlift.
The only other option is to stop the rail of the stairlift 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 and an independent stairlift company. Also take into account that while you may be able to use the stairlift this way in the short term you may find it impossible in the future. Some firms may not consider it an option as they feel there is too much risk involved.