Don't forget it takes about 14 volts to charge a 12 volt battery.190819-0909 EDT
There is no information on your background.
1. What is your definition of a transformer? If a standard AC transformer, then the answer is no.
2. Batteries are roughly constant voltage DC loads, thus, they must be charged from a current limiting DC source. With proper design that DC source can be supplied from an AC source. That could be a 12 V AC RMS output transformer with appropriate electronics between the transformer and the battery.
If it is low power you could possibly have a variable resistor/rheostat as your current limiting resistor.190819-1168 EDT
With a 12 V transformer I have 17 V peak available. Thus, with a single diode, and current limiting resistor I can charge a 12 V battery. This needs to be turned off or reduced to a low charge rate after the battery is charged.