2006 Subaru B9 Tribeca - trouble lights, loss of power

Driving in a snow storm, my trouble lights came on. First, the break light, the I noticed the headlights were getting dim and noticed the battery light come on. Next thing I realized that the windshield wipers were moving slowly. I was about 1000 feet from my driveway and the engine was loosing power. I made it into my driveway and the car could go no further. I am thinking this may bea battery/alternator problem as the loss of power was progressively worse as the minutes past.
Your ideas on the problem, please

Could be either one.

The alternator failed; the battery light indicates a charging system failure. While replacing the alternator be sure to recharge the battery before stating the engine.