We bought our Class A from a dealer in Arizona. For a modest fee they did all the paperwork involved in getting it across the border, they also drove it from door to door. There were other things we had to do once we took ownership to get it on the road, like a safety check, emission check. But it was relatively painless procedure.
A few more details such as your actual residence, what you would like to do and what exactly you mean by "out of state" will likely get more pertinent answers.
However... buying the RV should be the least of your problems. Without an address in any given state, registering it (getting licence plates) and getting insurance will be the major obstacles.
If you mean buying in one USA state and taking it back to your home in another state within USA with temporary plates, it is not usually a problem.
This may not be your case but FWIW....I am not convinced smaller dealers will understand the paperwork necessary to cross an international border (ie USA to Canada). Large dealers that move a lot of vehicles likely will.