Thomas, who revealed in September that he is HIV positive, said Harry has “done so much to normalise HIV testing and fight the stigma across the globe”.
The former player’s comments came as he was named as a member of the Terrence Higgins Trust’s new HIV Commission.
Thomas said of his appointment: “I spoke out about living with HIV, not for me but for all those people who are struggling and don’t have a platform.
“For them, I want to do everything I can to challenge stigma and outdated views about HIV.
“That’s why I’m thrilled to be joining the HIV Commission because I want to be a part of a positive change and play a role in driving us towards our goal where no-one else contracts HIV.”
Harry and Thomas met players from the London-based Kings Cross Steelers – who style themselves as the world’s first gay rugby club – and others from Premiership Rugby club Harlequins, to raise awareness about the issue.
Thomas was the highest-profile sportsman in the UK to reveal he was gay when he came out in 2009 and earlier this year said he was forced to reveal his HIV diagnosis after a tabloid newspaper threatened to publish it.
The ex-fullback, who captained both Wales and the British Lions, is thought to be the first UK sportsman to go public about living with HIV.
In recent interviews he said he was driven to suicidal thoughts as a result of his diagnosis but Harry and his brother, the Duke of Cambridge, have praised Thomas for revealing he is HIV positive.
Harry and Thomas decided to work together after the duke texted the Welshman asking to chat a few days after he revealed his HIV status in a Twitter video – now watched almost five million times – and a Sunday newspaper interview in September.
The duke and the sportsman met the club players at the Twickenham Stoop, home of Harlequins, ahead of National HIV Testing Week, which will run from November 16 to 22.