It should be possible to change the gearing out.
The bike you are going to buy will have to be equipped with a 9 speed set up because the 32, 34 cassettes made for mountain bikes currently go up to 9 speed. If you were to buy a 10 speed bike you would have to change the shifters out for 9 speed shifters or use some type of cable adapter.
In addition to the cassette you will have to swap out the rear derailleur for a mountain Shimano SGS style unit and a longer chain. Most of Shimano's SGS rear derailleurs have a 45 tooth capacity.
For example: If the bike you are considering comes with a triple crank set with 50-39-30 gearing (20 tooth spread) and the rear cassette you wish to use is a 11-34 (23 tooth spread) then you have a need for a rear derailleur with a capacity with atleast 43 teeth. The SGS rear derailleurs handle a 45 tooth capacity so you'll be covered.