Basiclly you'll need the engine, dash, and wiring as a minimum.
Reason you would buy a whole car is because you also get the cross member(fits easier), transmission (stronger), brakes (better), seats, carpet, and everything else. Then you could also part out the rest to make some of your money back.
WRX and STI are two different engines. Depending which years they all have differences in the engines too. Cheapest new age swap would be a 02-05 wrx 2.0L engine.