If you have them already then yes it will probably work, if you are buying for the purpose then have a read up on the various types of mobility scooter battery available as these are designed for traction use.
Note: I don't have a loco but I have used them for kids ride on toys (think Toylander) and they worked well; this was with a reclaimed controller with current discharge and low voltage safeties – matching controller to battery and motor is important for good service and longevity.