Wish I could get 3 weeks or more off to make such a trip.
Its not Ukraine that would have the restrictions its the car rental company. I suspect you might have to do some looking around to find one that would be happy with their car going into Ukraine. But its not something I have checked on. As for Budapest, Vienna, Prague and Krakow; they are more commonly referred to these days as being in Central Europe. In Budapest and Prague and Vienna figure the cost of the car each day its parked plus maybe another $25 to park it. Remember gas costs nearly twice what it does here and a great many of the road are toll roads of which you will miss knowing on one or two and end up paying a fine.
Prague - Cesky Krumlov - Vienna - Gyor - Budapest are easy and cheap train/shuttle trips. Krakow and Lviv are the outliers and more difficult to reach. The transportation costs will be less than the car. But I understand the feeling of freedom with a car, even if it does cost a bit more than the train. Its fantastic.
Lviv is accessible by air from Kiev and Warsaw (less than $150)
Krakow is accessible by air from Warsaw dirt cheap (less than $100)
Both Kiev and Warsaw are accessible by air from Budapest (less than $100).
There is a plan hidden in there somewhere; and any plan that includes Kiev is excellent.