Trigger relay at different voltages with voltage comparator
So is there any way I can set one value of voltage for the relay to
switch off and another value for it to switch on?

You can use a comparator with hysteresis like this: -

This circuit was designed to be a low power (sub 1 uA) comparator that works around 3 volts. It uses R5 to set the hysteresis: -

V3 (the battery) is ramped up from 1.5 volts to 4 volts and the comparator output switches high at about 3.1 volts and then switches low at about 2.9 volts.
If you fiddle with the values a bit you'll get what you want but concentrate on the mid-point between 5% and 25% for the actual set-point and let the hysteresis give you the margins you want.
For instance, if I change R5 to 1 Mohm I get this: -