No the Duex5 will only work with a Duet 2. In order to expand the Duet 3 you have other options via its CANBUS connection. Depending on what you need more of, you can add a single toolboard, or a 2 driver expansion, or even a second mini5+.
You can see a list of the expansion options here: https://docs.duet3d.com/en/Duet3D_hardware/Duet_3_family