Should I keep running when my ankles hurt or stop?
Pain is your body's way of telling you something is wrong. Stop running, figure out why you have ankle pain (which might include seeing your doctor) and then fix whatever is causing the pain, so you can return to running pain-free. If you keep running in spite of the pain, you risk doing damage that could be more involved to fix and require longer rehab, if you end up being able to run again in the future at all.
I would stop at the risk of causing them damage and try to find out what is causing them to hurt.
Listen to your body -- you only get one! Make sure you keep it healthy!!!
Well I would consider maybe some other things first. How old are you shoes that you normally wear? Most runners wear the cushion out in their running shoes in 6-8 months if they are avid runners. Otherwise a year to 18 months maybe if you are lucky and not a hard core, avid runner. Also where are you running? I know runners that mix up where they run and go to a track sometimes or the park and run on grass or pick roads that have soft shoulders to run on because running on hard concrete and sidewalks all the time takes its toll on your ankles, knees, and lower back. When I fought during my martial arts career I would sometimes run in place on a rebounder for this reason just to give my ankles, knees, and lower back a break and you might want to consider doing the same. Even running on a tread mill is softer and easier on your body that running outside on concrete which is what some avid runners also do to break things up and give their body a break. Consider what I am saying here and maybe run someplace else for a bit and consider also the age of your shoes and if they maybe need to be replaced. One or all of these things together might be the answer.
I'd stop. Pushing to injury is worse.