4pin fan on RAMPS board - direct?
Yes, this should work.

According to this 4-pin fan specification, such fans use a 5V PWM signal.
You would have to make sure the PWM frequency on the pin you use satisfies that 21-28 kHz range specified in the document.

According to 3.3 and 3.4 in the document, you may not be able to turn the fan off completely when using the PWM input signal.