Immanuel Kant distinguished between perfect and imperfect duties. The former are universally obligatory, i. e., allow no exceptions under any circumstances. The latter may have exceptions in some cases or alternative ways of fulfilling it?
Does the rule "never torture" define a perfect duty? Is it a moral absolute? Or is it sometimes morally permissible?
Here we enter the realm of "borderline situations " (Helmut Thielicke, Karl Jaspers) in which the usual rules and norms do not provide clear guidance but require a difficult situational decision in which no choice leaves us at ease.
In this context, one can argue that the rule against torture should not be made an absolute. Few moral principles are. There may be rare occasions in which morality may permit extraordinary means, including torture. This could be argued on both deontological and teleological grounds.
Opponents maintain that no such events occur in real life (the ticking bomb scenario) or are so rare as not to justify any exception to the prohibition against torture. Moreover, even if such emergencies justify torture in that immediate extreme circumstance, one might reason that on the whole the damage to the rule of law and to the global image of the country might still forbid it. Hence on balance it may be better to have an absolute rule that is never violated though it may be costly in some instances, though how costly would make a difference. I tend to fall into this camp.
Nevertheless, the ambiguities, contingencies, and uncertainties surrounding this question create a troubling space in which reasonable people may disagree.