No, I don't believe this would work with a base M1. As a matter of fact, the Q+A on that page clearly states it would not support a second monitor on an M1 because the M1 only supports a single external monitor.
To the O.P., I believe your only hope is a "DisplayLink" adapter because it emulates a single external monitor across 2 ports. But I'm not sure what that would look like in your setup of the external monitors on each side of your computer with the iMac in the middle. With DisplayLink the mouse will definitely move between the external monitors before it goes to the iMac.
Displaylink is the answer but for the record, pretending that two monitors is one is not what it does. It creates an extra display controller in software and sends a compressed data stream for the adapter to interpret. The extra display will then behave like any normal display, being separate and all.
You can definitely setup something like what OP is requesting through the help of DisplayLink but have to keep in mind to get an adapter that can support the resolution of an ultrawide (typically more expensive adapters), and that with the higher resolution you try to run, more system resources will be spent on the DisplayLink-driver.
There are also other caveats like DRM content not working as MacOS goes into a “screen is being recorded”-state, and the picture sent to the adapter is nicely compressed but still lossy to some degree, so it’s not suitable for precision work.