Planet Bike, Bontrager, Portland and a few others make (or made) inexpensive, very good and long lasting rack mount taillights that used AA and AAA batteries. I still have one or two for my early 1990s Univega hybrid with rear rack. They bolt into the holes already drilled into most racks. Pretty standard sizes. And it's easy to drill new holes or add sheet metal brackets if needed for custom fit.
And I have two or three sets of AA and AAA taillights that clamp to the seat tube or seat post but can be adapted to a rear rack with some sheet metal brackets and bolts.
Much as I prefer newer, brighter USB charged headlights, some of the older style taillights with AA and AAA batteries are still just fine for most purposes. The main advantage to super bright USB taillights like the Cygolite Hotshot and Hotrod is for daytime visibility. Those Cygolites are really too bright for nighttime group rides -- great way to blind your buddies behind you. So I'll use both types on some rides.