ALL Bontrager flare lights can mount to the light bar of a rear rack.
I recommend the Bontrager Flare RT. If you buy this light it comes with a seat post mount. The 2 part seat post mount has the rubber strap and a plastic adapter recessed in the rubber strap that you can remove and mount to the rear rack light bar with a small socket screw since it has a brass threaded bushing in it. It’s done this way on purpose for this reason.
This mount part can also be bought separately at any trek dealer as well as the light obviously:
https://www.trekbikes.com/us/en_US/e...t-kit/p/25674/