The 30-year-old forward has joined the Iranian team from Spanish club Mallorca for an undisclosed fee.
Alegria is now eligible to play for Foolad in the match against Al Faisaly of Saudi Arabia.
Foolad from Iran is to face Al-Faisaly FC in the AFC Champions League 2022 on Monday.
Alegria started his playing career in Spanish club Cacereno in 2010.
He has previously played in Spanish teams Levante, Zaragoza, Betis and Rayo Vallecano.
TM/IRN85035501