Solar powered mini fan
A large capacitor would work, yes. Just get something rated for more than six volts (I'd recommend more than twelve, a wide margin is a good thing to have!) and a large capacitance; the larger, the longer it will continue to run, assuming the panel was able to fully charge the capacitor before it was blocked. If you want it to run for a very long time, you might want to look at electric double-layer capacitors, also known as supercapacitors, which can have very high capacitance.