What was the rejection message ?
In any case, in this forum, you will only get opinion on the matter, you'll never get a sure answer: only the board review will let you know, after submission, if it is acceptable or not.
This is the mesage I got:
Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage
We noticed that your app requires users to register with personal information that is not directly relevant to your app’s core functionality.
Specifically, gender is not an optional field in your app’s registration.
Do you think if we do the things mentioned above, our binary will be accepted?
No one here can promise if your app will be accepted/rejected (app review isn't here), but my opinion is that following app review's comment is a good start.
Keep in mind that review stops at the first thing they find, so even if you comply now, there may be other issues as they continue to review.