what John is saying in verse 9. he is clearly talking about salvation because he says Christ will forgive all our sins.
If we confess our sins this has nothing to do with salvation. Salvation is by faith and faith alone.
It clealy says IF WE CONFESS OUR SINS. How much clearer can it be. This is not for unbelievers, and is not for salvation. Notice the word "if", this means you may do it, or you may not do it.
Salvation is "IF" you believe, not "IF" you confess.