Hello, I can help you with this. There are many different causes you could be facing here. The best way to get a cheap idea of the failure is to stop at a major chain parts store like autozone. They will scam the code for free. If it does happen to be gas cap related, just have them clear it on the spot. If it is another problem like an oxygen sensor or other emissions system you can then see a dealer.
Remember , some emissions parts are warrantied for 8 years or 80,000 miles.
Yes, the check engine light just indicates a malfunction. There will be a specific code that can be retrieved with a scan tool.
The stalling could be another symptom of whatever problem is causing the check engine light to come on. When it stalls, it is normal for the battery light and oil light to come on.
Autozone can also check your battery free at the same time if you are concerned about it.