Question: I am in a place where electricity is not ideal (old house, no ground), sometimes it occasionally shuts down and supposedly there are some spikes. 

I consider using UPS with the goal to increase safety of my personal data. My first priority is the health of my internal and external USB hard drives which can be damaged due to possible power instability. I do not care that much about possible losses of not-saved work, instead I just want to let my system have a minimum time to turn off without any risk of physical damaging my hard drives.

Would a cheap offline UPS suit my neads? Or do i need a better one with automatic voltage regulator (AVR)? How critical is AVR for the hard drives? The external ones require their own power supplies and will be plugged directly into UPS.

Answer: 
UPSes are roughly divided into *stand-by* and *in-line* classes. No matter what UPS you buy, it will have a surge suppressor and some basic filters. 

Stand-by UPS only kicks in when the mains power becomes "bad" (too low, too high, etc.) There is a several milliseconds delay, but basic PC power supply can survive that switching delay without any problem. 

In-line UPS always converts AC power to DC, and then back to AC to be fed into your equipment. So, naturally it provides better clean noise-free power, but the down side is that it is much more expensive, the double-conversion is lossy (UPS usually has a large and noisy fan to cool it down, etc.)

I've never seen in-line UPSes used outside of the realm of enterprise telecommunication equipment, where clean power is a must. I would say that a decent home UPS (they are all stand-by type) will be sufficient for your needs.

For an extra peace of mind, you can add a surge suppressor *before* the UPS, e.g. connect UPS to the surge suppressor, and then to the mains. However, I'd really try to obtain a decent ground, you can have lots of weird problems with your networking if your ground is bad or non-existent.
If you don't care about loosing unsaved work, then you don't need a UPS. The computer power supply makes sure the power to the drive is properly regulated. Either the power it delivers is correct for operation, or it shuts down; it won't let damage happen. If you are worried about surges, you can get a cheap surge suppressor for some extra protection, but the computer power supply already takes care of that.

As for your lack of ground, I assume you mean the outlets in the house are missing the third pin, so you have to use a ground adapter block. This means your house is about 40 years out of compliance with electric code and probably also is still using cloth insulated wires, which have a tendency to catch fire, so you should have an electrician rewire the house properly. Additionally, not having a true earth ground presents an electrocution hazard.