Hi,
I was wondering if it was possible to control a solenoid valve with a PWM signal so you can vary the pressure that is let through.
Yes, that's exactly how a cars electronic fuel injectors (EFI) work.
I cannot guarantee that
your solenoid valve will be fast enough (especially the spring return) for serious control though, but OTOH you shouldn't need anywhere near the accuracy of an EFI.
Have you got a link to a datasheet on the valve you wanna use?