Your thinking is good. Two options, well 3
One, you can get an adapter, kind of like the one pictured above. Been a long time since I've seen 'em though they will turn on the added light ONLY if both turn signals light.
Option 2 is to go to a dual lamp system on the bike rack, one for each side. This way half the fixture lights if it is turn signal, all for brakes,, I kind of like this solution, Or two side by side single lights.
Finally diodes.. Put diodes (3 amp at 24 volt should do nicely) from your local electronics store in the line.
Diodes are electrical "Check valves' put it in but do not formalize (Solder) the leads and test, if it works the way you want great.. Oh the banded end goes toward the bike rack. (if the diode is backwards turn it around).