What If You Didn't Know Something Is a Sin?
If you committed a sin as a youth but didn't realize it was a sin until you were an adult, do you need to confess it?
In order to be culpable for a sin, the person must know at some level that it is a sin. Our conscience often tells us that something is wrong even if we don't know exactly why it is wrong. There are also some things that we should know are sins even if it was never explicitly explained to us. We are culpable for those actions as well.
If someone does not in any meaningful manner understand something to be a sin and does not have a reasonable expectation of knowing it is a sin, then such a person would not be culpable for the action.
A person who is not culpable for a sin is not obligated to confess it. It might be spiritually, psychologically, or emotionally beneficial to confess it, and the person is free to do so, but there would be no obligation to confess it.