Trier confirmed the news in a statement Wednesday night, following a report earlier from ESPN.
The NCAA performed a random drug test on Trier in September, sources said, and the school was informed in early October that he had failed it.
Trier was suspended but appealed the decision. He won the appeal, but the NCAA prohibited him from playing until the drug was completely out of his system. He has been allowed to practice and travel with the team.
Trier has been tested since September, sources said, and while the level of the drug in his system has decreased, it has remained there as of the last test, which was taken within the past two weeks.
"I have never knowingly taken a banned substance," he said in the statement. "After finding out that I was given a banned substance by a well-intentioned, but misguided person not associated with the University after an injury, I presented this information to the NCAA. The NCAA agreed that I had no knowledge of receiving the substance and my eligibility was restored. Although I can practice and travel with the team, I am not allowed to resume playing in games until the substance completely leaves my body even at a trace amount. Unfortunately, I am unsure of when that time will be, but I hope it is soon."
A source told ESPN that Trier was in a serious car accident over the summer, and the Trier camp told the NCAA that someone close to his family gave him the drug -- without his knowledge -- to help him recover from injuries suffered in the accident.
Trier, who is 6-foot-5, averaged 14.8 points last season and was slated to be coach Sean Miller's top scorer in 2016-17. Without him, No. 14 Arizona is 16-2 overall and 5-0 in the Pac-12.
Trier could return this season if the drug clears his system, but Arizona has just 13 games remaining in the regular season.
He would make a huge difference for a Wildcats team decimated by injuries and in need of a go-to wing scorer.
Ray Smith tore his ACL for the third time during the preseason, point guard Parker Jackson-Cartwright recently returned after missing six games with an ankle injury, and Lipscomb transfer Talbott Denny is out for the season with a knee injury. One of Miller's top recruits, Terrance Ferguson, elected to play professionally in Australia instead of college.
Information from ESPN's Andy Katz was used in this report.