The answer to this is yes. Contrary to what many people believe, sex work is legal in India. Having said that, pimping, trafficking, forcing people into sex work, soliciting close to public places, and owning establishments (brothels) of sex work, are illegal. So as long as it is done privately and with consent, prostitution is not illegal in the country. However, in reality, a significant proportion of sex workers are forced into the profession.
Yes, there are male sex workers too. But mostly legal cases focus on female prostitution, which is more prevalent and visible. There is no clear legal stand on male sex workers. This means that very little attention is paid to the rights and rehabilitation of male sex workers who may also face the sort of exploitation faced by female sex workers.
It may sound incredulous but sex workers have as much right to live a life of dignity as anyone else and so can file a case in case they have been forced into sex without their consent, even by a customer. However, a sex worker cannot claim to have been raped if the customer fails to pay for the services he procured with consent.
The government is obligated to rescue and rehabilitate women, who are forced into prostitution by traffickers and pimps. In the past, the central governments have initiated various schemes under which protective and rehabilitative homes have been set up to prevent trafficking and rehabilitate victims. They have also offered medical care, legal aid, vocational and education training, etc. to sex-workers to help them earn live a fuller life without having to sell sex against their will.
While the government has made some positive moves in the past with regard to protection of sex workers, the community of sex workers has itself displayed great initiative in the form of the National Network of Sex Workers. It claims to have over 2,00,000 members who campaign for better laws and measures taken towards the health, hygiene and living standards for the women involved in sex work.