It could also be producing too much voltage at high RPMs, battery light will come on for over-voltage as well as under-voltage.
You need a volt meter
Test battery voltage engine off
12.3v to 13v is expected depending on age of battery, below 12.2v is time to shop for new battery
Start engine
13.9v to 14.9v is expected just after starting engine, this is "recharge" voltage, voltage regulator in the alternator is recharging battery after it was drained by starter motor.
After a few minutes of running voltage will go down to "maintenance" voltage
13.5v to 14v, approx. 1volt above battery voltage with engine off, this maintains battery without over-charging it, over-charging shortens battery life.
Increase RPMs to 2,000 and maintain that RPM
Voltage should go up briefly with RPMs then drop back to what it was, that is the voltage regulator keeping alternator from over-charging battery.
If voltage rises with RPMs and doesn't come back down then voltage regulator has gone bad, it will "burn out" the battery if left that way, so you will need new battery along with new alternator if you don't fix alternator.
You can just replace the voltage regulator inside the alternator, fairly straight forward if you are mechanically inclined, BUT(big but) voltage regulators don't tend to fail until the alternator is fairly old, and that also means the bearings, the brushes, and the fields in the alternator are old as well..............you may get another 6months with new regulator or a few years, no crystal ball here, just a heads up.
At idle turn on all the lights and heater fan to high
Voltage should drop and then come back up to what it was before, that is the voltage regulator increasing alternator output to match extra voltage load.
If voltage comes back up but not to what it was before then 1 Field(of the 3) in the alternator has failed, not a big deal but if a second fails then you will need a new alternator fairly soon as you will be draining battery at RPMs below 1,500