Ayala, 33, has not pitched in the Major Leagues since 2009, when he was with the Twins and Marlins. He pitched well this winter in his native Mexico, including during the Caribbean Series.
A baseball source confirmed the agreement, which was first reported on Wednesday by FOXSports.com. The Yankees have not made an official announcement.
Pitching in Mexico, Ayala had 14 saves and a 1.99 ERA this winter, including the Caribbean Series. He recorded two saves in four appearances as Mexico defeated Venezuela for the title.
Ayala pitched in three organizations last year at the Triple-A level, seeing time at the top farm club for the Dodgers, D-backs and Rockies. He was 2-10 with a 6.42 ERA in 36 appearances overall.
In 2009, Ayala was 1-5 with a 5.63 ERA in 38 appearances, 28 of them coming with the Twins and 10 with the Marlins. His best seasons came with the Expos and Nationals from 2003-07.
The Yankees have announced five previous non-roster invitations to pitchers, with Brian Anderson, Buddy Carlyle, Neal Cotts, Mark Prior and Andrew Cisco coming to camp. More announcements are expected this week.
Bryan Hoch is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.