Janet Smith has a wonderful article on this issue. A snip:
First, we must understand that the conscience is not equivalent to our thoughts or our opinions or our judgments. The Catechism (No. 1776) defines the conscience as an inner sanctuary in which we listen to God’s voice for guidance about our actions. So when someone is consulting his or her conscience, the question being asked is not “Do I think this action is good or bad?” but “Does God judge this action to be good or bad?” And God speaks to the consciences of Catholics through the Church.
If a Catholic is considering doing something that the Church teaches to be wrong, he can be certain that he is not listening to his conscience, but some other “voice” that has caught his attention.
Consider a question of conscience of this sort: “My wife has been in a persistent vegetative state for years. Would it be immoral for me to have relations with my lovely, lonely, unmarried secretary? We would get married if we could, but until my wife dies, I am not free to marry.”
Suppose this unfortunate, lonely husband said he thought his conscience was clear on this point — he was not really committing adultery because his wife was not available as a wife. Now, only God knows the extent of this man’s confusion and how honestly he has tried to work through the issues. But wouldn’t a Catholic priest have to say to this man, “I am sorry, but you are not properly consulting your conscience. God is clear on this point: Adultery is having sexual intercourse with someone who is not your spouse, and that is precisely what you would be doing.”
Such a man ignoring Church teaching would certainly be welcome to attend Catholic services, but would not be welcome to receive the Eucharist.