If you obstinately deny an article of Faith -- as opposed to having a fleeting doubt about it-- and you cling to your disbelief and/or refuse to pray and seek authentic counsel about it, then yes, you have sinned grievously against Faith and would commit sacrilege by going to HC without first confessing it, repenting of it, and having a firm purpose of amendment to reverse your disbelief.
Sustained, obstinate doubt (called incredulity), apostasy, and heresy, are all grave sins against the First Commandment which must be confessed before receiving HC.