Yes, that way can also be done, using a different type of charge controller, an inverter, and the normal mains charger.
The overall efficiency is somewhat lower, which can be compensated for by a larger solar panel, and the 12V battery needs to be large enough. Lead acid batteries do not like being deeply discharged, no matter what their labels might say. A typical leisure battery will barely last 200 cycles if regularly run below half full.
How often will you need to charge, and how much of your ebike battery capacity each time on average? Is this all year round, or a few weeks of holiday per year? I'll add some numbers later.
It might be that a second ebike battery charging at home whilst you ride with the first might be a better option.
Numbers:
Your 48V 20Ah bike battery is around 960Wh, taking the label literally. The charge efficiency of lithium ion is close to 100%, so you need 960Wh plus a bit to allow for the charge controller efficiency from your solar for a full charge from flat. Call it a round 1000Wh, because you don't really want to run it completely flat.
If you need that every day, then you will need about 200W of solar panels: an average day between April and September will give you 4 or 5 Wh for each W of solar panel. A pure blue sky will give more than 10, I.e. 2000Wh from 200W panels, enough to charge two such batteries.
So your 150W panel, if in good working order, is reasonably close to that, so I would start with that and a cheap Elejoy controller for direct charging.
Indirect charging via a lead acid leisure battery, or better, a LiFePO4 lithium battery, needs more panel and a fairly large intermediate battery. I took two 40Ah, 4 cell so 12.8V nominal LiFePO4 buffer batteries with me on my Scotland to Wales ride last October, leaving home with them fully charged. 40Ah x 12.8V is 512Wh each.
I found that using a Sterling Power 150W quasi sine wave inverter and the standard Shimano 1.8A charger, each put only 80% into a flat 418Wh Shimano E8014 battery - just 330Wh or so - before the inverter reached its 10.5V low voltage cutout. That's only 65% combined efficiency from inverter and charger, which roughly equates to 80% efficiency each, which is plausible.
So to go that route, you would need 1.5 times as much solar panel for a start, and then enough buffer battery capacity to match the 1000Wh needed by the bike battery. At 12V, 1000Wh is just over 80Ah, so allowing for inverter and chargef efficiency, 120Ah of usable capacity is required.
As a general rule, going below 50% depth of discharge is not good for the life expectancy of lead acid leisure batteries, so assuming you always have a full leisure battery to begin charging, it needs to be at least 240Ah. However, in the real world, it will not always be full, so either it needs to be yet larger still, or a separate 'low voltage cutoff' device will be needed to protect it from deep discharge. The inverter will keep on going down to a horribly low cutoff, which will trash the leisure battery in a matter of months.
It is also necessary to allow for the poor round trip efficiency of lead acid batteries: you only get back about 70% of the energy used to charge, which translates to needing even larger solar panels. To get the same effect as the direct charging using your existing 150W panel, you would need to increase by 50% for the inverter and charger efficiency losses to 225W, and then by about 50% again to 340W for the round trip losses.
Summary:
Direct charging will do fairly well with your existing 150W panel, and needs only a charge controller and wiring to set up.
Indirect charging needs double or more solar panel, about 240Ah of leisure battery, low voltage cutoff device and suitable inverter.
If you can find another 48V battery that fits the same mount as the first, I think the two batteries, direct charging setup is probably the way to go.