All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
We have mentioned in Fatwa 85151 that masturbation during the day of Ramadan nullifies the fasting and that the person who does so must make up those days even if they are many. If one does not know exactly the number of the days, then he should fast the number of days which he strongly believes would cover the number of days he nullified his fast.
However, the scholars have stated clearly that whoever eats or drinks or indulges in sexual intercourse during the day of Ramadan not knowing that it is prohibited, such as a person who was raised in a remote desert or a new-comer to Islam, then his fast does not become null for that violation.
If the environment where the enquiring sister lives lacks Islamic knowledge and ignorance is prevailing to the extent that people do not know that masturbation nullifies fasting, and the enquiring sister was ignorant about that ruling, then her situation is similar to that of the one who was raised in a remote desert. Therefore, her fasting is valid and she does not need to make up those days. However, if she fasts the missed days then it is better to be on the safe side.
Allaah Knows best.