Yes, you could do it that way or you could go with an edge triggered single shot multivibrator. Build it yourself out of discreet components and the transistors could be selected to directly drive the solenoid. Otherwise, use a chip version and use its output to control a driver transistor. Sorry, I don’t have my reference materials with me so I can’t look up any numbers for you.
If the time period accuracy or temperature stability isn't critical, you could use a simple RC circuit to control the base of the transistor that drives the solenoid. That would require two resistors, a capacitor, and a diode.