Yes. An online/double-conversion UPS will be the most effective, because it actually runs off the battery the whole time, so it's disconnected from any line quality issues.
A line-interactive UPS is cheaper, but doesn't do full power conditioning.
An offline UPS doesn't do any at all, only comes online when power drops.