The centre-back had to be replaced before half-time in Juve's 2-1 win over Lazio on January 27 after being hurt earlier in the game.
Juve's initial medical update said he had suffered from a sprain to his right ankle, while reports claimed he was looking at up to a month out.
However, he was able to take part in Juve's entire training session on Tuesday, suggesting he could yet win his race to be fit for the trip to Madrid.
Juventus take on Frosinone in Serie A action on Friday, a game that may come too soon for Bonucci.
But signs are more promising that the 31-year-old will return for Juve's following game at the Wanda Metropolitano.
Cristiano Ronaldo, Giorgio Chiellini and Douglas Costa all underwent "personalised training" away from the main group, with the latter said to be showing good signs of progress in his recovery from a thigh problem.
Bonucci has made 24 total appearances for Juventus this season, scoring one goal.