If there be any of you who is without sin, without sin of this nature, that has not some time or other been guilty of fornication or adultery, let him cast the first stone at her.
Or, does Jesus mean in that instance that only he who has no sin at all, may throw the first stone?
Correct, he who has no sin may throw the first sin. The reason is the well-known if you fail at one point of the Mosaic Law, you fail at all of it. Jesus wasn't necessarily pointing out they had all committed adultery, but rather had sin because they had failed in one way or the other.
The book of James spells out this concept.
For whosoever shall keep the whole law, and yet offend in one point, he is guilty of all. James 2:10
In turn, James is referring to these passages.
Cursed be he that confirmeth not all the words of this law to do them. And all the people shall say, Amen. Deut 27:26
But it shall come to pass, if thou wilt not hearken unto the voice of the LORD thy God, to observe to do all his commandments and his statutes which I command thee this day; that all these curses shall come upon thee, and overtake thee: Deut 28:15
And say thou unto them, Thus saith the LORD God of Israel; Cursed be the man that obeyeth not the words of this covenant, Which I commanded your fathers in the day that I brought them forth out of the land of Egypt, from the iron furnace, saying, Obey my voice, and do them, according to all which I command you: so shall ye be my people, and I will be your God: Jer 11:3-4
The whole point is this. The Law that is impossible to keep fully was to point to Christ who offers us grace, His righteousness (Phil 3:9).
And it shall be our righteousness, if we observe to do all these commandments before the LORD our God, as he hath commanded us. 6:25
So, back to the OP. Christ was saying if you have observed all the commandments, then go ahead, throw the first stone.