Rangers will face Monaco or PSV Eindhoven if they get into the Champions League play-offs.
The draw for the final qualifier took place hours before Rangers start their qualification campaign against Union Saint-Gilloise in Belgium.
The Europa League runners-up are due to be at home in the first leg on August 16-17 if they reach the play-offs.
Rangers will go straight into the Europa League group phase if they lose against the Belgian side, and would also do the same if they fall at the play-off stage.