Although this issue is more common with manual advance cameras, the solution is the same in either case - when you know the film is done, just rewind it yourself.
Rewinding the film early will have no detrimental effect on the film at all, other than possibly sacrificing a shot or two at the end of the roll.
Something worth taking into consideration is that if the camera does this on every film, its likely a fault which you can work around by rewinding when youknwo the roll is done, however if this is the first film it's happened on, it's possible that the film may have broken and could have problems being rewound.
Some cameras detect that the film is finished when they feel resistance as they try to wind on. If no resistance is felt, it will simply wind on a full frame and enable the shutter release, so if the film has snapped, there will be no reisitance to tell the mechanism to stop winding.
As you know that you have reached the end of the film, rewinding it yourself is the best way to check this without opening the camera.
If the film is indeed fine, it should rewind as normal and you will feel some slight resistance on the crank as you wind the film back into the can.
If the crank turns with no resistance (or worse, has some resistance then becomes very free turning), it suggests a broken film, however all is not lost.
My main camera is entirely manual, and I tend to stop shooting when the indicator shows the full number of exposures have been taken, even though there is usually at least one more left on the roll.
Having broken two films from overzealous winding, I am now very cautious of screwing up another.
If you do need to take the film out and make it light safe, the answer from Alan Marcus is absolutely right - a lightsafe container in a well darkened room can save your film, and don't be shy to ask for help if you need it.
I can pretty much guarentee that every photographer using a semi or fully manual camera has broken a film at some point!