Terms of the contract weren't disclosed, but MLB.com and other media outlets indicated the A's offered the 39-year-old slugger $500,000 for the one-year agreement.
Ramirez announced his retirement last April after playing five games for Tampa Bay. At the time, Major League Baseball had disclosed his second violation of its Joint Drug Prevention and Treatment Program, which carried a 100-game suspension.
But in December, he applied for reinstatement and his suspension was set at 50 games.
The 12-time all-star, who turns 40 May 30, served a 50-game suspension in 2009 when he was with the Los Angeles Dodgers.
In 19 seasons with Cleveland, Boston, the Dodgers, Chicago White Sox and Rays, Ramirez produced a .312 batting average with 555 home runs and 1,831 RBI. He helped the Red Sox to world championships in 2004 and 2007.