It's definitely possible during the first two years, especially at pass/fail med schools that primarily evaluate you at the end of the block. If you're planning on dancing with a team regularly, I'd suggest setting hard rules for yourself like "I'll leave practice at 11 PM no matter what," "I'll only go to practice if I've finished ____ today," etc. and communicating those to your team so they know your limitations (unless a comp is coming up). I found over time that setting those hard deadlines is key to making sure you get the most out of practice, but at the same time don't stay too late and show up to clinic/class the next day exhausted/unprepared. This'll help your team be clear on how much they can rely on you and it'll make sure you stick to your personal study schedule and don't fall behind.
If you can't join a team, most med schools have set aside money for extracurricular groups and it's very doable to organize a set to perform at an existing med school event (like a fundraiser or something) or teach other med students and perform at random on-campus events or nearby weddings.
If anyone is reading this and considering joining a team, definitely go for it! At worst, you can always stop if you realize you don't have the time, but at best, you'll make some friends outside of med school, get some exercise, and do something that'll help take your mind off school.