Yes, you can have trouble coming back to the U.S. It is unclear whether you will be allowed to complete your education, where you depart. More information is needed. At this point, you should schedule an appointment with an experienced immigration attorney. You need to use care at this point. An immigration attorney can better counsel your criminal attorney on what should be done in criminal court, if possible.
It may not matter that it is a first offense. An admission to an offense is all that may needed to have your visa cancelled and cause you to be summarily excluded from the U.S. in some situations. A non-immigrant visa is a bit different than immigrant visa status upon entry.
An experienced immigration and visa attorney can better explain options, such as waivers or exceptions to inadmissibility. There may be an exception. Efforts should be made before you plead guilty, if at all. Certain forms of dismissal may not help you.
The above is general information and does not create an attorney-client relationship.