Hey!
I had a dog during my student life and I have to say that's actually the best time because you're pretty flexible concerning your time table etc. I got my dog from an animal shelter while I was still in school. I think it's a good idea to get an older dog and not a puppy if you don't know what comes after your studies.
I don't regret getting a dog while I was a student. However, you should be aware that you have to plan your day around your dog. So if you're at uni 5 hours a day and your friends decide they want to go to the pub afterwards, you probably have to head home and walk your dog instead of socialising. I lived in Germany most of the time, where having a dog is a bit easier because they are allowed in shops, restaurants, pubs etc. You can basically take him anywhere you're going (except to the cinema or the swimming pool, but that's where you don't want to take him anyway I suppose ;-). I then moved to Edinburgh for my MSc studies and took my dog with me. Which I don't regret either because it was great to walk him in the hills and explore the countryside. However, I found it more difficult compared to my life in Germany because you can't take the dog anywhere. So I ended up spending a lot of time on my own with the dog while my friends were going out (if I had a long day at uni - if I had uni 4 hours in the morning I had enough time to walk my dog in the afternoon so he was tired enough when I went out). I don't have a problem because I'm used to it but it might be a bit challenging if you have to change your life like this.
Having said this, I also didn't expect that my dog is so healthy that he celebrated his 15th birthday last week. After my studies I found it extremely difficult to find a job because I didn't want to leave my dog alone all day. I had a great job offer from Vienna, but said no because it wasn't compatible with having a dog. I ended up moving to a city I didn't like and working in a job I liked even less, but where I could work from home 3 days a week so I could be with my dog.
My dog is also one of the reasons I'm going to start a PhD in Scotland this year. I can work from home most of the time for the next 3 years and sit in the hills with my books and take walks in my lunch break. I don't want to put you off getting a dog, I just want to tell you what it's like. I love my life how it is just now, I can't imagine a life without my dog and am already dreading the day he's going to pass away. But you also have a huge responsibility. A dog has feelings like you and me and he won't understand if you give him away after your studies because your life has changed. So please think this through, ask yourself in how far you're willing to change your lifestyle for a dog and if your job agrees with having a dog. Maybe you study something which allows you to start your own business, which would again allow you to take your dog with you in the office. But maybe you will end up in a lab 40 hours a week and have to give your dog to a pet sitter (which I personally wouldn't want to do for 5 days a week). But these are questions noone can help you with and that you have to answer for yourself.
I wish you good luck with your decision and if you have any questions don't hesitate to write me a message!