It is possible to modulate the drive of some types of solenoid fluid valves to ultimately regulate the pressure of the fluid at their output port. I have designed a product that does excatly that.
However, you can't easily use any valve. You want a valve that is intended for part-way operation between full on and full off. There are such solenoid valves, but you shouldn't assume they can do this unless this is explicitly stated. These are often referred to as proportional valves, althogh they aren't necessarily all that linear.
Using PWM to control a solenoid is quite feasible. The product I mentioned did exactly that. You should make the PWM period short enough so that the current thru the valve changes little each cycle. Only the average current goes to driving the valve. The high speed AC component only heats it without doing anything useful.
Valves intended only for on or off operation are not suitable for this. You can PWM the solenoid, but PWMing the fluid flow causes a lot of mechanical stresses, pulses, and other problems. On/off valves aren't intended for that kind of operation.