Can somebody be punish for not telling their leaders about the sin they have committed, like how Achan was punish for not telling Moses about his sin until God found him out?
"But the children of Israel committed a trespass regarding the accursed things, for Achan the son of Carmi, the son of Zabdi, the son of Zerah, of the tribe of Judah, took of the accursed things; so the anger of the LORD burned against the children of Israel" (Joshua 7:1).
"Now Joshua said to Achan, "My son, I beg you, give glory to the LORD God of Israel, and make confession to Him, and tell me now what you have done; do not hide it from me"" (Joshua 7:19).
"Did not Achan the son of Zerah commit a trespass in the accursed thing, and wrath fell on all the congregation of Israel? And that man did not perish alone in his iniquity" (Joshua 22:20).
Achan's sin was in taking things from Jericho when God said not to do so. Achan died for that sin. Yes, he attempted to hide the fact that he sinned, but God knew it happened from the moment he did it. Achan had chances to confess his sin when Israel lost the battle at Ai. He could of spoke up as the lots drawn kept narrowing who was guilty down to him. Yet, Achan waited until the lots pointed him out before he admitted his sin. In other words, perhaps if he voluntarily had admitted he sinned, it might have spared him and his family; instead, he faced the full wrath of God.
By the way, Moses was no longer alive when Achan sinned.
There is no requirement in the Bible that a sinner must confess his sins to a particular individual. We are to confess our sins to God. "If we confess our sins, He is faithful and just to forgive us our sins and to cleanse us from all unrighteousness" (I John 1:9). God also wants us to talk to someone we trust about our sins. "Confess your trespasses to one another, and pray for one another, that you may be healed. The effective, fervent prayer of a righteous man avails much" (James 5:16). But nothing says it has to be a leader in the church.