We know that it must be a serious matter, and it should be done with full consciousness and freedom. When we commit a serious act with full conscience and freedom, it becomes a mortal sin. However, if one of these elements is lacking, then it is not a mortal sin. This is the teaching of the Church.
In this case, I don't know this person, but it is possible that this person is struggling with scrupulosity. In such a case, it would be sufficient for this person to go to Holy Confession regularly. We can assume that this person is not living in mortal sin if they are doing so.
When there are doubts about whether something is a mortal sin, the person can ask the confessor specifically about it, and then they should obey the confessor’s guidance. Of course, the confessor must be prudent in their judgment.
Dear visitors of Gloria Dei and all who have already written or who will write a personal message to me. I am grateful for your attention, your kindness, for your spiritual support and especially for your sacrifices and prayers for me. God may reward you!