If this is a brushed DC permanent magnet (PM) motor, then yes it will work, but could work too well. If you switch a high capacity battery in reverse across it, it will draw a huge current which would have the capability to damage the motor, by demagnetisation, the vehicle, and the battery.
If you are using a motor controller, that has a programmable current limit, then it depends on the software of the controller. As the motor will be generating power, and delivering to the battery, the power flow is not what the motor controller was designed for. Some will continue to work as an old skool current source, others will detect a fault condition and shut down in some way.
If you are using a 3 phase BLDC motor, then it all depends on the software in your ESC. Unless the ESC has been designed to handle this power flow, it is almost certain that it will shut down at the error condition.
When you brake a load, it generates power. This is physics 101. That power has to go somewhere. If you don't store it in a battery, then you will have to allow something to get hot. It actually simplifies the control if you can force the motor controller to idle, and then switch a resistive load across the motor terminals to absorb the power. Note that if you put a short circuit across the motor, the braking torque will be high and uncontrolled, and the motor windings will get hot to absorb the energy.
There are two main options for what you do with the energy. One is to store it, and then allow it to dissipate it slowly once the braking event is finished. The second is to dissipate it fast as it's generated.
In the first option, you might bolt power resistors to a large metal heatsink, say the alli chassis of your vehicle. In the second, ordinary filament bulbs, especially auto bulbs that are cheap and readily available, can dissipate significant power, mainly because they are designed to get very hot. The temperature coefficient of resistance of a filament works very well for braking, as their resistance increases an order of magnitude as they get hot, which means they tend (tend ==> more so than a resistor, less than a controlled current sink) to a constant current, that is constant torque load, over a wide range of voltage (speed). They could double as a brake light as well ;-)