That's why the Church draws a distinction between objective sin and subjective culpability. The latter involves either invincible ignorance and/or psychological or physical compulsion. Accompanying people is, or should be, directed at overcoming these issues - i.e. clarifying the Commandments and guiding someone through overcoming whatever compulsion there is - not condoning their behaviour or leaving the situation as it is.

Notwithstanding this, even if a person is not in a condition of subjective guilt, Canon Law governing the distribution of the Eucharist is clear. It must be withheld from those in a situation of manifest grave sin e.g. adultery.