You can get away with a lot if you just want it to run for another year or two.
I once bought a well-abused old Javelin for $50 when my daily driver had been injured in an accident and I needed wheels. The Javelin I-6 engine was the predecessor for the Jeep 4.0L. The one I got had been sitting for so long the valves were sticking and the pistols were stuck in the bores. I pulled the head, got the valves loose, cleaned them up on a wire wheel and just re-lapped them onto the seats.
I used a length of 2x3 to knock the pistons loose after soaking with penetrating oil. I reamed the carbon ridges,, rotated the pistons as far down as they would go, honed the cylinder walls, wiped them down with assembly lube, and put everything together with a new head gasket. No new pistons, not even new piston rings. It ran just fine for two years, after which I sold it for more than I had paid for it.
What's your budget, and what do you really want out of this rebuild/whatever?