It *is *actually up to us to judge if we had the full knowledge and complete (deliberate consent).
We are to do what according to Paul and the Church? Examine ourselves. We examine our conscience. The Church gives that very criteria* so that we may actually judge*.
We are not obliged to confess something that was grave matter but which was not given complete consent (deliberate consent) or where the needful knowledge was lacking. And yes we are to make a judgment.
1778 Conscience is a judgment of reason whereby the human person recognizes the moral quality of a concrete act that he is going to perform, is in the process of performing, or has already completed.
1781 Conscience* enables* one to assume responsibility for the acts performed. If man commits evil,* the just judgment of conscience* can remain within him as the witness to the universal truth of the good, at the same time as the evil of his particular choice. The* verdict of the judgment of conscience* remains a pledge of hope and mercy. In attesting to the fault committed, it calls to mind the forgiveness that must be asked, the good that must still be practiced, and the virtue that must be constantly cultivated with the grace of God
Now of course God is the final judge but he will also take into consideration what we judged.
And the confessor can assist.
Such is not though the Teaching of the Church or the Discipline.
And yes in cases of doubt it is to be counseled yes for most as a rule of thumb – to confess the doubtful mortal sin – noting though that there is doubt. (Those who struggle with scruples are might be advised by their regular confessor not to confess such).
So yes practically speaking if one commits something that contains grave matter but one is doubtful that one had the needful knowledge and consent -it can be a good rule to confess it noting the doubt. But if one clearly knows that one did not have the needful knowledge or deliberate consent – if one confesses it -one notes that too (for that would make it a venial sin if any).
And if one clearly knows one did not give any consent --no matter how grave the matter – it is not matter for confession (example impure thoughts which happen to one out of the blue but which were not consented to at all.)