I used to work for Avis.
When one of our cars broke down or malfunctioned, we would exchange it at no cost for a similar vehicle. The only issue was that we didn't have extra staff to do this, and it took two if the rental was undriveable in its present condition. So you might have to wait for the exchange wherever you were when the car broke down, maybe for hours.
You want to avoid that, I assume.
If it's daytime where you are, drive to the nearest location of the rental company. (If possible, drive to the location where you rented it, so they'll be the ones dealing with their own problem.) Phone ahead to tell them--not ask, but tell, politely but firmly--that your rental vehicle has an electrical problem affecting the tail lights and you are coming in to exchange it. Return it to the rental lot as if you were turning it in at the end of a rental. Note the mileage and the gas gauge reading. By calling ahead, you've given them time to find a similar vehicle on their lot, get it washed and gassed, and the swap should only take a few minutes.