No warranty will be void if you replace the clock battery. It's a consumable item.
+1 to this. It would be reasonable for a user to replace an RTC battery (provided they know what they are doing) and not have it affect the warranty. It's not hard, just replace it with the same type, most likely a a CR2023 lithium cell.
Even upgrading a machine (adding more RAM, installing an I/O card) would not invalidate manufacturer warranty and even if they claim that it did, its likely to be in breach of consumer laws in your country.
If a replacement battery doesn't fix the issue, check to see if there is a BIOS update for your machine, it may be a known issue. Alternatively it could be a problem with the RTC itself or the motherboard.