Dumb guess, but didn't Toyota sell a bunch of Yaris over the years? Pretty sure they all used the same engine--if not all years, then at least a decent spread. Probably fastest and cheapest to find a junkyard motor and drop in. Junk the car if it's rotted or somesuch, or if a freebie car is available. Otherwise it's likely the cheapest option.
If you really want to get involved (not sure I would), you could try pulling the head and looking. I suspect that a HG replacement might be more work than engine swap, but if your labor is free it might be the cheap option. But I'm not so sure about the bottom end--might get lucky, I guess it depends on what can be seen once the head comes off. If the rings did go bad, well, could always do a ring and bearing job (and HG a second time). Lotta work--hope he has a garage.
Yes Toyota used the 1.5 1NZ engine in several models....Echo, Yaris, xA, xB and the 1st 2 Prius gens. Very robust little engines.
My 18 year old daughter drives a '10 Yaris LB with about 150k on it. The drivetrain is rock solid.