Using a capacitor for instantaneous power?
Yes.

As long as the size is sufficient, and the load is DC, and the load can tolerate the drop in voltage during the switching time, and suitable isolation like diodes or switches keeps all the power supplies tame during the switchover.

If the load is AC, then a rectifier and inverter will be needed in addition to the capacitor.