Can EPDM roofing be applied directly over XPS panels?
Always follow the manufacturer’s installation instructions. One of the largest roofing companies is Johns Mansfield (JM).
There’s many considerations including attachment to roof structure, splicing, fitting around vents, conduit, etc. If you use their accessories, fasteners, etc. it’s more likely that the system will be weathertight.
Here’s their product description:
https://www.jm.com/en/commercial-roofing/epdm-roofing-systems/membranes/
Here’s their insulation and cover board options. I don’t see XPS, but I do see a lot of polyisosanurate  options.
https://www.jm.com/en/commercial-roofing/roofing-insulation-and-cover--boards/
As you can see, the insulation comes with an isolation board to isolate it from the membrane. In addition, they recommend Fesco Board to install on the roof deck to isolate the insulation and membrane from the roof structure.