Is it true that 同志 has some different meaning? Like gay (as in homosexual) or something? I know that during the 20th century in China and communist Russia it was very common to call people 同志 (товарищ, comrade). So is it wrong to call someone 同志 in China nowadays?
Yes it is true. The official word for somebody who is gay is 同性恋者 (tóngxìngliànzhě), but in recent years 同志 (tóngzhì) is frequently used as slang for somebody who is gay.
The most relevant parts:
In 1989, the Hongkonger 林奕华 named the first edition of his gay film festival "香港同志电影节"
From then on, in China and other Chinese speaking parts such as Taiwan, Hong kong, Singapore, Malaysia, “同志” gradually became the name for gays (and lesbians).
Further on the same page you can read:
In recent years after the introduction in China most young people stopped to use the word “同志” due to its implicit meaning.
Despite its implicit meaning in China which is known and used my more and more people, the official Chinese media (in the mainland) and official documents don't accept this meaning.
Both meanings are in use now.
While President Hu reviews the People's Liberation Army in Hong Kong in June this year. He shouted 同志們好 and 同志們辛苦了. (Thanks for the hard work comrade!)
In the Pride parade in Hong Kong last month. It is named 香港同志遊行. And artist HOCC came out by shouting 我係同志.
I'm not sure in what instance you'd be using 同志 nowadays anyway. Are you in the army? Do you actually have comrades? Or is this purely hypothetical?
From my experience with the language, if you want to call someone gay, people would say:
他是个同性恋 - tong2 xing4 lian4
Or, to say someone is not necessarily gay, but they're acting effeminate:
他很娘娘腔 niang2 niang qiang1, or simply, 他很娘
断袖之癖 duan4 xiu4 zhi1 pi3
(Actually, this idiom has a pretty neat back story. Basically, Emperor Han Ai Di was in bed with his man lover Dong Xian, and had to attend a court audience that morning. Not wishing to awaken Dong Xian, whose head was resting on the emperor's robe's sleeve, he had to cut the sleeve off (断袖)).
People born in 70s or before won't consider this word the translation of gay. So be careful when you speak this word with young ones.
"同志" literally refers to someone else with a "common" purpose (with you). During the Maoist era, the connotation was "comrade," in the context of "Communist" or "party member."
Nowadays, the connotation may be that GENDER is what someone (and a lover) may have in common. That would translate into "homo" or "gay."
I think people normally don't say that anymore, only if they work for the government. Ordinary people nowadays stopped calling others 同志 because now it has another meaning, which is gay or lesbian.
If you say 同志 in a formal circumstances or talking to elder people, then it is totally appropriate and respectful. If you use it online or in a younger community, most people would think it means gay nowadays.