Adultery is one of the destructive sins. It is one of sins which Allah, the Most High, set out its fixed punishment that must be enforced. If the adulterer person is married, then his punishment is killing. If he has never married, then, hundred lashes. That punishment is applied to both man and woman.
Committing adultery is a great offence against oneself and the society, it is also a violation of sanctity/dignity, which is illegal in Shariah. It is incumbent on the perpetrator to cleanse himself with repentance.
Doing so during Ramaḍān is a great disobedience because fasting restrains people, what if one is not restrained? the person must check his heart and reprimand it, for certainly, Allah is Acquainted, sees him and his offence.
As for the ruling of fasting, it must be repaid, although, the scholars differed in their sayings regarding the atonement.
The most significant is to reproach oneself and have a sincere repentance before meeting Allah, the most high, with an offence that deserves punishment.