All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is apparent from your question that you suffer from whispers on the issue of Kufr (disbelief) and apostasy. This question seems to be hypothetical, so we do not answer it.
What you should know is that if a person is certainly proven to be Muslim, then his Islam cannot be overruled with doubt. In principle a Muslim remains as a Muslim and he does not go out of the fold of Islam unless he does, says or believes in something which the Quran and Sunnah prove to be a major disbelief that takes a person out of the fold of Islam, or which the scholars agree in a consensus to be major disbelief.
Subsequently, a specific person is not ruled to be a Kaafir (disbeliever) unless the conditions of considering him as a Kaafir are met, while there are no impediments that prevent from considering him as such. Among these conditions is that he must be an adult person, sane, doing the act by his own free will, and he is not ignorant or misinterpreting (a text), because such things are impediments (that prevent applying the rule to the person).
Allah knows best.