Connect STM32 Ethernet to PHY - clock signal
Looking at the datasheets you provided, if you want to use RMII mode there seems to be no other alternative than what you already suggested.
Namely, you must connect 50 MHz clock output both to PHY (REFCLK) and MAC (RMII_REF_CLK) in order to synchronize them.