It's not a must, but it's better
There's no specific requirement to apply in ERAS. You can apply even if you haven't taken any step
However, the issue is that residency programs prefer "complete" applications which in the case of an IMG means IMG certified which means passing Step 1, Step 2 CK, and Step 2 CS and Step 3 (the latter if you need H1 Visa).
If you apply without any of the steps your chances get considerable lowered.
If at all, at least apply with Step 1 in hand. This is because most US students apply to the match with only Step 1 results and so in that case you are at least comparable to them.