A battery by itself can have current flowing in or out, but not both at the same time.
You can however build a system that charges the battery and supplies power to the load. That is, charger power is divided between the battery and the load.
For example, this arrangement is how a car battery + alternator works. With the engine off, the battery discharges into the load. When the engine runs, the alternator puts power into the battery and powers the rest of the car at a controlled voltage, determined by the needs of the battery.
The fact that the alternator, battery and load are connected together is why automotive power is a wider range of voltage: it is the range of the lead-acid battery, whose voltage varies depending on state-of-charge (11.6 ~ 13.8V, up to 14.7 with float charge.) More here: What should the voltage of a fully charged lead acid battery be?
A power bank is a different design. Unlike an automobile, they separate the charging circuit and output regulation into different circuits. Thus, they deliver a fixed output voltage regardless of the battery state-of-charge.
Small, economical power banks (e.g., USB in / USB out) use a charger IC for the input to the battery, and a boost / buck / buck-boost from the battery to the load. The charger IC is low current, so typically it will shut down the output DCDC while charging the battery (no pass-through.)
Fancier power banks support pass-through power if their power source allows it. That is, the 'charger' side has enough extra current to power both an attached load and charge the battery.
Phones and laptops are more sophisticated than cheap power banks. These all support charge-while-run. But they, too, may reduce the load (switch to low power mode) to allow for more power to make its way to the battery.
Finally, a UPS works like a power bank that has pass-through capability. The battery charge side has enough capacity to power the load and charge the battery at the same time. So it will switch seamlessly between AC power and battery power with no interruption at the load.