It is certainly possible to have a dog during medical school, though it will be varying degrees of difficult depending on your circumstances.
My wife and I got two cats (both ~a year old) and a dog (~4 months old) while I was in medical school. We got the cats at the end of M1 year and the dog towards the end of my M2 year. During the pre-clinical years, you could probably do whatever you wanted if you weren't planning on going to class. Keep in mind, though, that even if that is your strategy, there will likely be some days where you will need to spend a significant time away from home.
From my own experience, there is no way that I would've been able to care for a dog - puppy or adult - on my own once I hit the wards. Your schedule is simply too unpredictable and and you will be spending a lot of time at the hospital (I would assume 10-12 hour days at least). Even for a trained adult dog, that's a stretch. If you don't have any roommates or significant others that are willing to help you, you will be relying a lot on services to help you (walking services, doggy daycares, etc.), which cost a lot of money. Also keep in mind that having a dog ties you down quite a bit; doing something like taking a weekend trip out of town is made much more difficult and/or expensive by having a dog. When my wife and I went on our honeymoon, we had to pay $50/day for boarding, which added another ~$400 to our trip cost. Just for our dog.
I love my dog and don't regret getting her. But if you're fine with either dogs or cats, then I would get a cat far and away above a dog. They're low-maintenance, loving animals if you give them some attention. They can do well on their own, so your crazy schedule has less of an impact on your ability to care for them. Even if we went on week-long trips, my wife and I would just leave out a big bowl of water and a feeder bowl and make sure to clean the litter boxes and they were good to go. All and all, I think cats are much more suitable for the average medical student.
That said, if you do end up deciding to get a dog, think carefully about your ability to care for it and the demands on your time independent of taking care of the dog. This is doubly true if you've never had a dog before. A puppy in particular basically operates at the level of an infant. They require constant attention, will pee and poop all over your floors until you get them trained, and will likely destroy just about everything in your home that they can get to. They are a lot of work, and most medical students don't realistically have the time to take on that responsibility on their own without significant help.