If the battery is removable and if you carry the charger along on your rides, then yes, you can take it inside a business, and plug it in.
But, since it can take several hours, maybe 4-5 hours from nearly empty to full, you might need to be there awhile for a full charge.
In reality, you will probably never randomly arrive somewhere with the battery that low (unless you make a plan to do so) ....but...just topping it off a bit (to get you back to your campsite) might only take an hour or so.
What I found is that during the day with full sun, that is the best time to use 'opportunity charging' to charge the ebike. trying to charge it from your storage or house battery during non-daylight hours is a sure way to drain that main battery, so then, the next day is spent trying to get it back to full charge.
Now of course, if someone has a lot larger solar array and larger (or several more) main batteries then they would be able to charge the bike whenever it was needed, as opposed to when they had solar input. And of course, using a small generator will easily charge the ebike AND contribute a charge to your house battery system with the use of a battery charger for those.
Of course another option is to buy a spare ebike battery (expensive!) and then that battery can be topped off or charged during the daylight hours when you might want to be riding, and that gives you the ability to ride the ebike during the day using the other, fully charged, battery.