I think you are mixing 2 idioms.
1) People in glass houses shouldn't throw stones.
2) a phrase from the Bible: “Let him who is without sin among you be the first to throw a stone at her.”
This can be simplified: 1) Do not criticise your friend if you do it also (i.e do not throw stones, especially if you have glass windows - you'll get hurt also.
2) Casting the first stone - no one is blameless/innocent. We all make mistakes or deliberate wrongs. So throw the first stone (at someone you blame) only if you are innocent. Which we are not.