The question about whether a person can legally drive while under the influence is a trick question. Of course, a person cannot intentionally drive under the influence or alcohol or drugs.
However, there is one instance when the behavior may be excused: when there is a necessity to drive to protect oneself from harm. Now, keep in mind if a person drives impaired, they will most certainly be arrested. The police officer pulling him or her over will be 100% immune from a plea of necessity. Even if sympathetic, the officer's job is to take the drunk driver off the street.
Necessity or justification is an affirmative defense similar to self-defense. In a case of self-defense, that act must be admitted. An attorney cannot raise self-defense without admitting the punch was thrown, or the shot was fired.
In DUI, if a person is trying to escape a dangerous situation or attempting to seek medical help, they must first admit they were impaired. Then they must justify their actions before a jury. No prosecutor will simply accept a defendant's explanation of events. It is a question for a jury to decide. The accused will have to testify, and the entire case will rest on his or her credibility.
Of course, this writer does not advocate drunk driving. This discussion was simply the presentation of an effective, yet rare legal defense to DUI.