Dybala left the field in tears and clutching his hamstring early in the second half, although the fact he was able to walk off will be encouraging for Allegri, who also lost Sami Khedira to a head knock.
The Argentina international will now be sent for tests as Allegri waits to discover how long he will be without the striker.
"We don't know how bad it is now, but he will have tests," he told Mediaset Premium .
"Fortunately we go into a two-week break now and he'll evidently need to rest more than the others during that time, so hopefully he will be fresh for the final weeks of the season."
Juve had to rely on a 74th minute strike from Federico Bernardeschi to overcome a spirited Cagliari side, who felt the goal should have been disallowed for a Medhi Benatia elbow on Leonardo Pavoletti in the build-up.
The hosts were further incensed when they were denied a penalty following allegations of handball against Bernardeschi, imploring referee Gianpaolo Calvarese to use VAR to no avail.
"We didn't react as well as we should’ve done, the second half was very physical," added Allegri. "It was very important that we bring home the result, so I compliment the players, as we are still in Napoli's slipstream and have broken away from Inter and Roma.
"After going 1-0 up, we could’ve added another goal, or at least done better to control the ball rather than allow Cagliari opportunities to equalise.
"I will say that Cagliari did not deserve to lose. VAR is an instrument that was meant to reduce controversy, but instead it has increased it because people don't accept the referee's decision."
The win, which closes Juventus within a point of leaders Napoli, was Allegri's 200th in Serie A and 100th league win in charge of Juve.