That might work for the PWM signal, however you'd still need some electronics as the fan has internal pull-up to 5V and expects it to be pulled low by the PWM signal.
But a small circuit with a Schmitt-trigger inverter IC and some resistors and capacitors might do the trick, for example.