Yes this can affect your eligibility. When you complete the FAFSA form you will be asked whether you had a drug conviction for an offense that occurred while you were receiving federal student aid.
Can you please tell me what other convictions can affect my eligibility for aid?
You cannot receive a Federal Pell Grant if you have been convicted of a forcible or non forcible sexual offense, and you are subject to an involuntary civil commitment upon completion of a period of incarceration for the said offense.
I have a conviction but am not sure if it falls under the conditions you described.