The 22-year-old, who is without a club following his exit from Bristol Rovers earlier this season and unable to join a Football League club until January, was training with the Millers as boss Neil Redfearn tries to improve his squad.
However, there will be no immdiate future for the former Manchester City youngster at the Millers after he joined the National League North club.
Trinity chairman Richard Kane posted on Twitter: "Pleased to announce the signing of ex Man City/Bristol Rovers Adam Drury to @GainsTrinity."
Drury should be available to make his debut in the Lincolnshire side's FA Cup clash with League Two Shrewsbury on Sunday.
Millers boss Neil Redfearn had said of Drury: "Adam is a young boy that is in between clubs.👀 pleased to announce the signing of ex man city / bristol rovers winger Adam Drury to @GainsTrinityFC #inittogether yes available for Sun 👍— Richard Kane (@ska_7467) November 4, 2015
"He has got good pedigree having come through at Manchester City, he can play one or two positions, he is comfortable with the ball.
"It's an opportunity to have a look at him. We are just having a look at him, we've not got to the next bit yet."