The author doesn't make clear whether Peyton Farquhar is dreaming that he escaped or if he really escaped, but there are hints. For example, I started to realize that the whole escape was a dream sequence when Farquhar was able to avoid being shot by all the soldiers who were aiming at him. He succeeded in swimming away, without being killed.
When Peyton Farquhar is running, and running, and running, trying to make it to the safe part of the state, to get home, he is tireless, he does not stop, after swimming, he is able to run, until finally he sees his wife, who looks totally, perfectly calm and happy to see him as if nothing is wrong.
Had Farquhar really escaped, his wife would not look so fresh and calm, she would have been more emotional and greeted him with passion and joy.
I knew it was all a dream and that he was about to die because all the events of the last moments of his life amount to a beautiful dream, and unattainable dream. Farquhar dies with the vision of his wife stamped in his memory forever.
In "Bridge," Bierce foreshadows the imaginary nature of Farquhar's escape mainly through imagery and minute detail. The protagonist's eyes are not covered in Part 1 of the story, and so the reader can "see" the setup of his execution site through Farquhar's eyes. He lets "his gaze wander to the swirling water of the stream racing madly beneath his feet" and then closes his eyes to let his life flash before his eyes. When Bierce returns to present time in Part 3 of the story, Farquhar is now falling straight down. Phrases such as "he lost consciousness," he was awakened "by the pain of a sharp pressure upon his throat," and a "sense of suffocation" all hint at Farquhar's demise by hanging.