There are loads of problems with your plan, but frankly I'd say the biggest one would be how unfair it'd be to the animal.
If you live in student accommodation, you wouldn't have enough space to house the doggo without it becoming pretty unhappy. I mean, would you like to be stuck inside a room all day (or a small flat/etc?) with nothing to do? I mean, I am, but I study all day and I'm mentally readied for that. The dog wouldn't be. The accom wouldn't accept a dog, or any pets, and there's no guarantee you'd have a quiet accommodation either. I lived outside a strip club in my student accom. Actually, four strip clubs. It was a fun time to be a student... the amount of older white males I saw drunk and hounding in the night. I was one of them! >: ) ) )
If you rent accommodation, good luck finding a place that'll take a student and a dog. As others have said, it's pretty hard to find a place that accepts pets in general any short of actually buying the flat, and the average student doesn't have whatever amount of cash it takes to buy a flat less make a deposit on the flat. If you did actually find one, who would care for the dog during the day, etc. The whole argument of leaving the creature alone all day long in a flat comes back.
You might be able to find something on Spareroom/etc for a roomshare/houseshare that might permit you to take a pet, it you're very very emphasis on very lucky. If you did, then you'd be in business, especially if the dog you have is friendly with kids, since families often rent on there and I've seen a few ads that accept pets here in Edinburgh.
Anyhow,
You could buy a flat
Or you could get lucky on Spareroom and find someone willing to have you and your pet.
Other than that, zip. Nada. If you had it registered as an emotional support animal, you'd still need a place to keep the doggo, and a tiny student flat or room wouldn't do it.