Героям Слава!
Sure. There's a thing in a lot of languages called grammatical cases. In basic terms cases make a word "adhere" to the rest of the sentence. Different languages have different amounts of cases. For example, German has four, Ukrainian – seven and Russian – six cases for nouns.
In this case the word тракторист would change to тракториста and it rhymes with триста.
The whole joke looks like this:
— Триста.
— Отсоси у тракториста!
Haha, you got me.
Though I think cock would rhyme better with sock, but you've got the gist of it. Keep it up!
No, it doesn't refer to Spartans. It is a rhyme that doesn't translate well into English and is on the same level as ligma or joe mama jokes.
Whenever someone ends their sentence with 300 a quick-witted individual may reply with "suck a tractor drivers cock!". 300 and "tractor driver" rhyme in this case in Russian, bringing the desired comedic effect. As you can imagine teenagers love it and even try baiting their friends into saying 300.
You can find many words that rhyme with any word for a dick in English and make this joke free of charge. I will start:
— "Have you seen my sock?"