or don't buy the carbine, just tell the salesman "it could be for a 9mm rifle"
it's not really a matter of legality anyway, it's not illegal for someone under 21 to posses handgun ammo, it's just a matter of store policy. i used to buy handgun ammo in AZ all the time when i was under 21, never had a problem.
Well it does need to be bought for a rifle in order to be legal. So if he buys it for a rifle thats legal. Whether it ends up in a rifle or a handgun it doesn't really matter. You have to be 18 to purchase rifle ammo (from a store) and 21 to buy pistol ammo from a store. Good news is most pistol ammos also can go into some rifles, so when you goto buy it tell the clerk it is for a rifle. In fact I know at Wal-Mart the register prompts the clerk with a question, is this ammo to be used in rifle or a pistol? If you look over 21 they usually don't ask, if you look young they ask you which one its for then ask for ID for proof of age. Just like buying cigarettes ~vs~ beer.
Personally I don't step foot into wal-mart, but if you can't find anywhere else, hey its all you got. AFAIK the only good SD ammo wallyworld sells is PDX1, which is very good ammo. Some people swear by it, personally I prefer Rangers (which are actually basically the same thing), but my favorites are HSTs, Golder Sabers, and Gold Dots, in that order.
But none of these are cheap, but they may save your life, so don't go cheap. Buy about 100 rounds of which ever SD ammo you decide to use, shoot it all off at once, except enough to keep your magazines full. If you have just ONE FTE, FTE, or any other non-user failure, shoot it all off and try a different kind. Some pistols don't like certain ammo, nothing you can do about it (unless you know enough on how to play with your pistol, or can afford to take it to a gun smith). Then buy a couple hundred rounds of the cheapest FMJ's that you can find, and have fun.
As said before I believe wal-mart carries PDX1's which is a great round get some of those, if this is the only place you can find to sell to you. And if you can find it and your pistol is rated for it get some +p or +p+, it really isn't all that different in recoil, but sure does pack a bigger punch.
I can't wait till my favorite site gets in my .45acp HST 230g +p, and Ranger T 230g +p. Can never have enough powder behind a good JHP. Right now I am running Hydro Shocks 230g, or Hornady 185g +p. I no longer trust the old fashion Hydro Shocks (the HST's are the new version of these they are made by Federal) after doing some testing, where the jacket separated from the lead, and the jacket broke into several pieces. The reason I don't like the Hornady's all that much is because they are only 185g, and I like my 230g better, I'm just much more use to the functionality of my pistol with the heavier loads. When I get less lazy, I will unload my magazines and load them with my Gold Dots I have in my Ammo Cans.
Anyways, good luck. I also suggest that you pick a weight and try to stick with it, that way when you practice and get used to fallow up shots, if God forbid you need to use them in a SD situation, you wont be thrown off by a difference in how the firearm moves differently.
God Bless you and yours, and God Luck!