tl;dr: If you want to do it long-term, it's impossible without Hungarian residency. If you want to do it short-term, special "Z-plates" are available for up to 30 days. Read on for the legal details.
For short-term registration.
An export plate (called a Z plate because it starts with a Z) is only valid for 30 days and then you need to get another plate probably somewhere else as the Z plate is not extensible. So yeah, OP could theoretically get the car for a 30 day joyride.
If you want to do this, it is very strongly recommended to not try to navigate the system yourself but find one of the specialists dealing with a Z Plate because officially it might take 21 days to get the plate but if you have someone helping you it might be less than a day. That's Hungary for you. Officially, of course, all said specialists do is make sure the right paperwork is filed. Unofficially, it's anyone's guess whether they bribe the authorities or not. I will let you guess. Also, the purchase will be a lot of fun, you should ask the seller to drive it to your place because the purchase contract needs to include a clause that the car will be unregistered from traffic because of sale to abroad and then you need to hand in the regular plates when you ask for a Z plate and of course the car can't move without plates. The Z plate is a registration for 30 days.
Now, as for long-term registration.
There are actually two right-holders of a car and they can be separate: one is the operator and the other is the owner. The operator has all the rights and responsibilities regarding the vehicle except transferring ownership and operatorship which belongs to the owner. Most of the time these two are the same person or entity but this is not actually a requirement. Armed with this knowledge, let's check the law 326/2011. 42. § (2) e)
A járművet akkor lehet forgalomba helyezni, ha...
... a jármű üzemben tartója Magyarország területén rendelkezik lakcímmel vagy székhellyel (telephellyel).
Let me translate: The vehicle can be registered if the operator has a residential address or premise within the territory of Hungary. (There are other requirements which I skipped.) You can't get a license plate without a registration and you can't operate the vehicle without the registration certificate at least not on any public road. And by "residential address" here we do not mean you are in an AirBnB for a week, it means you actually have a way to legally and officially prove your address which is done by the official "address card" which you can only get if you are 1) a Hungarian citizen 2) a citizen of an EU state 3) have a Schengen "D Visa" 4) granted refuge status 5) probably there are a few more extremely rare, convoluted cases I can't think of.
The logic behind is in the responsibilities of the operator: someone needs to pay the required insurance, taxes, possible speeding fines and so forth. And it's much easier to find said person if they have a Hungarian address.
As we have seen with the Z Plate it is possible to own the car without operating it. This is corroborated by relevant law (1999. LXXXIV. 9. § (1)) says the car registry contains the address of the owner but there's not a pip in there whether that's a Hungarian address.