Your alternator has stopped charging, so the car is running purely off the battery. That is the diagnosis, and it is a good one.
The battery's job is to start the engine; the alternator's job is to supply power once it is running and to recharge the battery. When the alternator fails, everything is drawn from the battery until it is flat — which is why the car runs fine for a while and then simply dies, often with dimming lights first.
With the engine running, measure voltage across the battery terminals. Around 13.5 to 14.5 volts means the alternator is charging. A reading at or below battery voltage means it is not.
Replace the alternator if the belt and connections are sound. Do not keep driving on battery power; you will strand yourself somewhere inconvenient.