That 9V battery may get the solenoid switch on and off with the help of a big capacitor - a few times, before it's empty. And that'd be a massive capacitor: it would have to produce pretty much all the current, so you're looking at supercaps. You need 6 mF to keep the voltage higher than 6V for 20 ms; 30 mF for a 100 ms pulse; based on the 3Ω resistance.
Well, your solenoid is an inductor so it takes a bit before that much current is actually flowing making it a bit better (it makes the calculation more complex - and you need to know the inductance as well).
You could try a 4700µF or 6800µF electrolytic first. Make sure you add a fast flyback diode on the solenoid to take care of the reverse current. A diode between cap and solenoid may also be useful, to prevent the solenoid from using the cap's charge instead of the flyback diode. Add a suitable current limiting resistor between the cap and the battery, to protect your battery. 100Ω would do fine, keeping the instant current <90 mA.