Being a bystander tends to refer to seeing something happen in a public setting. You may be a bystander when you are supporting someone when you see something and safely step in on the street or at an event. A bystander intervenes when it is safe to do so and generally relates to supporting someone after something has happened for a short period of time.
Being an ally means supporting someone you know, like a friend, family member or work colleague, over a period of time. An ally might check in on their friend to ask if they're ok. Being an ally usually means being more intimately involved in support the person, sometimes over a period of weeks, months or years.