1. To buy a bike in Vietnam is easy and fast.
2. To buy a good bike is a little harder, but not too much.
3. To legally buy it, so the papers show your name is very close to impossible as a tourist, if not defo impossible.
But as some wise person already said above,
this is Asia.
The maximum size seems to be a semitrue rumor. There are bigger bikes in the country, Expat-Harleys and Duals, but also old Urals from the Vietnamese Army. But in comparisson to the overall number of bikes they are non-existent.
It seems to be possible to arrange tours, but on a small bike it would be easier to dodge the first one before entering, if you couldn't sneak through, and get a new one on the other side.
If you buy a bike in Vietnam it makes sense to go for a pretty new second-hand step-through Honda. If they are old, they got too much crap inside. Take the original, the 50 Bugs more will be worth it. To find them is no big problem, but if you can't seem to find a few within, aehm..., an hour or so

, just ask your hostel in Hanoi, they are used to that.
Buying the bike in Vietnam has, as pointed out above, the advantage to enter and leave all countries without too much hassle if lucky, or some hassle and bribes if unlucky. Been there done it: Vietnam->Cambodia->Laos->Thailand->Malaysia all no-brainers, no questions asked no problems made.
If you can, get a photocopy of the Vietnamese Owners ID and make him sign a letter that says that he sold it to you. Maybe also get that in Vietnamese, strange-looking is always good.
Now for the Routes you propose:
Vietnam:
Do not go along the coast from Hanoi to Vihn. The Road along the coast, beside the Hai-Van Pass (between Hue and DaNang - go there!), is not worth the terror you will be in. On the HCMH (Ho Chi Mihn Highway) you have the road mostly for yourself, the mountains are steeper, the road twistier and the hotels cheaper. In The south I can recommend the Chau Doc Border Crossing. Small and easy.
Cambodia:
You've been to Angkor Wat before? Cause you are missing it on the route you'll take, and if you havn't been, it's worth it. With your own bike it's alos much more fun to explore. Crossing with Laos is smooth, Road is brand-new. Bring Pictures for the Visa or a Visa from Phnom Phen.
Thailand:
You are driving to Nan, which is a nice enough drive, but the real awesome part is the Road from Nan to Chiang Rai. Also you are not going anywhere in the north-West, on purpose? I understand you have to hurry it a little, but up there is the beauty-driving.
Laos:
If you can't go, or won't go, to Vietnam, the North East of Laos should be on your list. The Are north-East of Pakes (down-south) is on you ruffly marked area. Just a side-mark: make sure you don't get lost, as I did, and end up, after 2 days, at an unmarked Vietnamese Border Post just to go back.
Borders (just my experience with the Viet-bike, not all useful for you):
Vietnam to Cambodia:
Chau Doc Border Crossing in the south. Small and easy.
Cambodia to Laos:
Crossing with Laos is smooth, Road is brand-new. Bring Pictures for the Visa or a Visa from Phnom Phen.
Laos to Thailand:
Friendship Bridge close to Vientianne, easy and fast, even though I destroyed my paperwork.
Thailand to Malaysia:
Drive-Thu like a McD.
If you got more, just ask.
Cheers
Tim