T
If it is not a sin, then can the non-mortal sins confessed in the invalid confession, be forgiven via the Our Father (since the latter can forgive venial sins).
this question makes no sense.
are you asking if your confession is invalid when you deliberately withhold mortal sins, yes it is and you are not absolved of any sin, moreover are guilty of the additional sin of sacrilege. That does not mean forgetting, not knowing the actual gravity of a sin. That means you know it was a mortal sin, or thought it was, and deliberately refused to confess it.
If you mean, the sacrament was invalid because the priest did not use the proper words or actions, if you intended to confess and did not know there was a problem, you are forgiven. If you realize he did not perform it correctly, ask him immediately to correct it, or go to confession to another priest.
If you mean, I thought the sin was mortal, and I withheld it, but later found out it was only a venial sin, were my sins absolved? No probably not because you had no intention to confess all known mortal sins.
It is btw nearly impossible not to know whether a sin is mortal if you have taken seriously your obligation to become educated on Catholic moral teaching. There are dozens of books and sites to help you examine your conscience so there is no excuse. If you have to ask yourself in a particular situation: “Did I do a mortal sin?” the answer is almost always NO especially for a young person, because mortal sin requires full knowledge as well as full free will consent. No knowledge. No sin. But if you don’t know the answer you have an obligation to find out asap, preferably by asking the priest in confession.