It depends ... if you only stayed for a holiday in Malaysia, it is no problem, because your country of residence was the Ukraine (where you are living for 5 years), not Malaysia.
To get the ticket, you need a proof that you lived more than 6 months in Ukraine. Normally it is a visa you own. You need this visa or permit of residence together with your passport to buy the ticket then online or at a railway station.
If you have a visa for the last six months when you arrive in Krakow to buy the InterRail ticket, it is no problem to get it - even if you stayed for two weeks or so for holiday in Malaysia.
Check if Interrail or Eurail: rail.cc/en/interrail-rules
Have a lot of fun traveling Europe !!!