Yes. But only if its done right. 12V to 12V.
The basic problem.
A large, full battery bank and a small low battery.
Too much potential for excessive amps.
Direct connection I would consider very bad.
Simple fix.
A high watt resistor in line. AND A FUSE!
Slower charging
Maybe a 2 to 4 ohm, 25 watt resistor.
Maybe a 8 or 12 ohm, 15 watt resistor.
Cheap on the surplus market. US$0.10~$2
Search "sandstone resistor".
The resistor limits the amps. Saves the battery, and who knows what else.
More efficient than an inverter and battery charger. Very efficient at very low charging amps.
I sure would not connect a 24 or 48V main to a 12V lawn mower battery without a 100 ohm resistor. And I would check the situation often.
BTW, Some 12V supply chargers for 6V battery powered devices use this concept, but much higher resistance values.
That's why they say 'don't let it charge more than 1 hour', or something like that.
With 12V to 6V, the 6V battery will eventually cook.
Do not forget the fuse!
Maybe 5A?
Because you... me... somebody... is going to connect it backwards sooner or later.
Use a fuse.
G-