No, John was addressing Christians when he said to confess our sins so Jesus can cleanse us from all unrighteousness.
1 John 1:8-10
King James Version
8 If we say that we have no sin, we deceive ourselves, and the truth is not in us.
9 If we confess our sins, he is faithful and just to forgive...