Engine swaps are feasible but not great fun, and parts tend to be a bit costly (though not outrageous).
WRX cars before 2006 came with a 2L turbo motor. WRX STi cars of any year in the US came with a 2.5L turbo motor. RS, TS, and anything other than WRX +/- STi cars came with atmospherically aspirated motors that aren't relevant if you are buying a WRX car.
Given any choice at all I'd buy a car that runs correctly, since there's no way of knowing what else went (or is about to go) wrong with a car that's at most 7 years old but not running.