It seemed to me that the time loop was created by the Eye of Agamoto, so if Dormamau would have just destroyed the Eye, wouldn't that have broken the time loop? In one scene, we do see Strange and the Eye get blasted to smithereens.
The Eye of Agamoto was necessary in order to create the time loop, but it does not automatically follow from this that the time loop was dependent on the Eye for its continued existence. By way of somewhat dubious analogy, destroying a nuclear launch site will not retroactively protect you from any missiles that may have already been fired from it.
As a starting point, there does appear to be precedent in the Doctor Strange mythology for magical effects to be permanent, though I'm not sure whether there are any examples in the MCU.
However, while we could assume that the time loop was held in place by an active spell that could nonetheless outlast the existence of the artifact used to create it, that isn't necessarily what was happening in this case. Instead, it is possible that when Doctor Strange cast the spell, he was affecting the future, and that from that point onwards no further magic of any sort was necessary.
In other words, perhaps once time has been tied into a loop, no further magic is necessary in order to maintain that state of affairs. If that is the case, then the only way to escape from the loop would not be to destroy the Eye, but to use the Eye, or another similarly powerful artifact or other magic capable of affecting time, in order to reverse the effects of the previous spell.
(Presumably Dormammu, being native to a dimension without time, would be unable to do so even if he were to steal the Eye from Doctor Strange.)