According to Bill Vinovich it's legal:
“It obviously caught me off guard,” Vinovich said. “I’m not gonna say what the Ravens should or shouldn’t have done. I mean, the easiest thing [for them] to do would have been to call timeout and let them match up. Basically it was just a brilliant play on Bill Belichick’s part and it caught them off guard. That’s why you have to be able to think quickly. Not only did I say he’s not eligible, I said, ‘Do not cover 34 [Vereen].’ But the DBs were obviously confused. What’s going through my mind is, Can he do this legally? Was Vereen in the previous play? All these different things start going through my mind. Then I realize that going from eligible to ineligible, you don’t have to be out one play before. The other way, coming back ineligible to eligible, you have to be out of play. Now he can’t go back to eligible without going out for a play, which he did. Some of the stuff they throw at you, you just go, whoa. That’s the great part of officiating—it’s always changing. Someone’s gonna think of something different to do. But the play was legal, totally legal.”