A car battery without a fuse or circiut breaker is a very dangerous tool!!!!
It will run a largescale loco just fine if it is configured for DC. Some DCC locos have DC shut off. A malibu transformer is AC power but a diode bridge can be used to convert it to DC but the DC will have waves unless a capacitor is installed to filter the pulses.