doesn't USMLE require you basically to finish studying in US?
No, as long as you've graduated from medical school in a country that has accredited/globally recognized medical schools, you can take the steps (USMLEs), and thus you can get ECFMG certified.