Using a 12V battery while simultaneously charging via solar panel
While it is true that you can't actually charge and discharge a battery simultaneously, it is quite common to have a charging source, a battery, and a load, all connected in parallel so it looks like you are charging and discharging simultaneously.

If the charging source can deliver more current than the load requires, then the excess current will be used to charge the battery.  If the charging source delivers less current than the load required, then the battery will supply the extra current needed.  This switching between charging and discharging will happen automagically as the charging source and load vary.