The decree, or fatwa, was passed on Sunday by a group of clerics.
It said that according to Islam transgender people with "visible signs" of being male or female may marry someone of the opposite sex.
But those with "visible signs of both genders" may not marry, it said.
The 50 clerics, part of the little-known Tanzeem Ittehad-i-Ummat body based in Lahore, also said any act intended to "humiliate, insult or tease" transgender individuals should be considered a crime under Islam.
The fatwa is not legally binding in any way.
"We are glad that somebody's talked about us too," transgender rights worker Almas Bobby told BBC Urdu. "By Sharia we already had the right [to marry], but unless measures are taken to remove the misconceptions about us in society, the condition of our community will not be changed."
Another social worker for gender issues told BBC Urdu that it was a "good step", but that issues would remain until transgender marriage was officially legitimised.
Qamar Nasim said that many police officers had charged people in transgender marriages because "due to a lack of knowledge... they consider it same-sex marriage".
"This practice can only be stopped when [the] government spread awareness about rights of a transgender person."
Transgender people are discriminated against in Pakistan and struggle to find employment.
More than 45 transgender people have been killed in the Khyber Pakhtunkhwa province in the past two years, according to local rights group Trans Action.
Last month, a 23-year-old transgender activist died after delays in treatment. Alisha, who was shot eight times, was in critical condition when admitted to hospital but staff could not decide whether to put her in a male or female ward, according to her friends.
Trans Action, an advocacy group, say that there are at least 45,000 transgender people in the province and at least half-a-million nationwide.
In 2012, Pakistan's Supreme Court declared equal rights for transgender citizens, including the right to inherit property and assets. They were also given the right to vote the year before.
However, it has denied homosexual couples the permission to marry, with cases in the past of male homosexuals being charged under anti-sodomy laws.

The move comes as part of a campaign by President Xi Jinping to show that the ruling Communist Party (CPC) is cracking down on corruption and waste.
Glitzy new government buildings, sometimes in impoverished areas, have been a source of public outrage.
The directive forbids luxury makeovers and expansions done under the guise of repair work, Xinhua news agency said.
The notice says some departments and local authorities have built huge government office compounds against regulations, tainting the image of the CPC.
Among the buildings that have attracted widespread disapproval in recent years is the western-style government office building in the city of Fuyang in Anhui province, in eastern China.
It reportedly cost 30 million yuan ($4.89m, Â£3.19m) to build and is referred to as the 'White House' by residents.
A state-owned drug company also caused outrage after photographs emerged apparently showing a building decorated to mimic France's Versailles palace, complete with gold-tinted walls and chandeliers.
Some government agencies have reportedly built luxury offices in seaside resorts where officials can stay for free or at deeply discounted prices.
The ban - described as an "across-the-board halt" - includes training centres, hotels or government motels, Xinhua said.
It also says government organisations should not receive sponsorship or donations towards construction projects, or collaborate with private companies.
"Banning the building of new government buildings is important for building a clean government and also a requirement for boosting CPC-people ties and maintaining the image of the CPC and the government," Xinhua quoted the directive as saying.
Tackling corruption has been President Xi Jinping's most high-profile policy since he became China's leader earlier this year.
He has warned that "corruption and bribe-taking by some party members and cadres" pose "severe challenges" to the Communist Party's rule.
A religious decree declaring transgender marriage to be legal has been cautiously welcomed in Pakistan, but activists say attitudes still need to change.
[NEXT_CONCEPT]
China has banned the construction of government buildings for five years, according to state media.