"A Farewell to Arms," first published in 1929, is protected under copyright in the U.S. until 2034 (95 years after publication date). According to the Hemingway Society permission to use excerpts from the book would come from the publisher, Simon and Schuster.
What about fair use? The first two paragraphs of "A Farewell to Arms" contain less than 200 words. That level of borrowing (plus four lines of dialogue) combined with a transformative purpose (a fictional character's quoting of Hemingway) makes your stage play a good candidate for fair use. The trouble with our analysis is that only a court can substantiate a fair use claim and we doubt whether you want to be dragged into a legal battle. In addition, if you are hoping to have your play produced, there is a strong possibility you will have to indemnify the play against infringement ... which means you'll probably want to obtain permission, anyway.
What about Dickens? All of the works of Charles Dickens are in the public domain and free for you to use without permission.
By the way dept. You could stage your play in Canada without much problem as "A Farewell to Arms" is in the public domain up north. You could also include clips of the 1932 movie, "A Farewell to Arms," which is PD in the U.S.