You can have a Mazda dealership rebuild or order you a new engine, or you can buy a rebuild kit for a rotary engine for about $1,300 at http://www.racingbeat.com/FRmazda2.htm
RacingBeat makes high quality RX-7 parts and is a trusted source. The kit isn't that bad, but you'll need to get estimates on labor, and that could cost you $3-5k.
Find a local garage with RX-7 and rotary experience and you'll save a good 25% from what a dealer would charge you.
Fwiw, I had a new turbo and rotary engine installed and it cost me about $6k at the dealership. You have to really love the car to put that kind of money into it.
Also, more and more people are putting small block Chevy V8 crate motors into old RX-7s now - the balance and weight is about the same, but the engine is more reliable and a bit more powerful.
Check out these sites: http://www.rx7club.com/showthread.php?t=241137
and search for 'v8rx7'