Can flow rate of a small gas flow be controlled by a small solenoid valve that is opened and closed rapidly in a certain frequency?
Yes absolutely. Many small electronic pressure regulators work in pulsed mode. Typical examples:
A piezo valve would often be used though, rather than a solenoid valve.
I've prototyped a specialty pulsed-mode solenoid-valve regulator, and got outstanding performance. The limitation was durability, which led to the product being changed to proportional-mode solenoid valve.
With the pulsed mode, to maximize control performance, the off-the-shelf solenoid valve that was used, required opening and closing the valves quickly. This in turn had two drawbacks. (1) It excited mechanical resonance (ie overshoot in the mechanical step response) and (2) it put extremely high cycle counts on the moving part. So you need a valve designed for such use.
This is where piezo valves come out ahead at the smallest scales. For slightly larger scales, proportional-mode solenoid valves might be a better fit, although the nice thing about pulsed-mode is that the flow is more predictable, which simplifies control.
In any case, you would need a detailed understanding of the valve choice.