A person who studies in a country different from his or her birth country, and then returns to his or her birth country is unlikely to have lost citizenship or voting rights in his or her birth country. Indeed many countries will permit the student to vote by absentee ballot during the period of study.
Unless the student has done something that the laws of the birth country consider to be a reason for losing voting rights or citizenship, there is no issue here. No such thing is mentioned in the question as it now stands. Indeed since the question asks about the student acquiring dual citizenship, it implies that the student has retained citizenship in the birth country, and so presumably voting rights there. The motive suggested for dual citizenship thus does not seem to make sense.
To acquire citizenship in the country of study the student would need to go through whatever process that country's laws specify. In most countries that includes a statement of intention to remain permanently in that country, and some evidence supporting that intention. The process is also likely to take rather longer than a typical course of graduate study. It is unusual for a student to gain citizenship in a country of study while still a student. It is still more unusual for a student to gain such citizenship and then return, not for just a visit, to the student's birth country.
Some countries allow people being naturalized to retain citizenship in another country, some do not. Some countries allow a person who gains citizenship in another country to retain his or her birth citizenship, others do not.
If the country of study permits migrants to retain another citizenship while being naturalized, and the birth country permits a citizen to retain citizenship while being naturalized elsewhere, and, the student complies with the laws of the country of study for gaining its citizenship, then the student will have obtained dual citizenship. This is unusual, but it is perfectly possible if the laws om the countries involved permit it, and a good many do. But obtaining citizenship in a new country with which one had no previous connection is generally not a simple or quick process.
Now, if one of the student's parents had been a citizen of the country of study, then the student might be able to obtain citizenship there by inheritance. Some countries allow this under some conditions. But that would have nothing to do with the student having gone there for study.