It is usually done before your ivf stim starts. If your menstrual cycle is usually 28 days and you will be on a short protocol, it would be on day 21. Ideally, your af comes as per your normal cycle and you start your ivf stim.
If you will be on a long protocol, I think the clinic will do the scratch for you and start your downregulation. Then wait for your af to arrive and start your ivf stim.
To be honest, I also had failed cycles after getting an endometrial scratch. While there is no study to support its effectiveness, I did all I could to enhance my chances to get pregnant and it was a no-regret move that I made.
I encourage you to discuss with your doctor. Do it if you are comfortable. Otherwise, don't.