The ruling applied not only to Data, but to all sentient artificial life forms who came after him. That was the whole point of the judgement and ruling made by the JAG, Phillipa Louvois, who stated that she was making a ruling that spoke to the future about their rights as sentient beings.
Was Admiral Haftel acting outside of his authority? The answer is yes he most certainly was. Did Starfleet renege on it's earlier position? If they knew what Haftel was up to it's possible they were trying to create some loophole in order to take advantage of the situation, but that would go against everything that Starfleet stood for.
Here's the pertinent sections of script during the trial from 'Measure of a Man' that directly addresses the rights of all who come after Data:
PICARD: And now you propose to dismantle him.
MADDOX: So that I can learn from it and construct more.
PICARD: How many more?
MADDOX: As many as are needed. Hundreds, thousands if necessary. There is no limit.
PICARD: A single Data, and forgive me, Commander, is a curiosity. A wonder, even. But thousands of Datas. Isn't that becoming a race? And won't we be judged by how we treat that race? Now, tell me, Commander, what is Data?
MADDOX: I don't understand.
PICARD: What is he?
MADDOX: A machine!
PICARD: Is he? Are you sure?
MADDOX: Yes!
PICARD: You see, he's met two of your three criteria for sentience, so what if he meets the third. Consciousness in even the smallest degree. What is he then? I don't know. Do you? (to Riker) Do you? (to Phillipa) Do you? Well, that's the question you have to answer. Your Honour, the courtroom is a crucible. In it we burn away irrelevancies until we are left with a pure product, the truth for all time. Now, sooner or later, this man or others like him will succeed in replicating Commander Data. And the decision you reach here today will determine how we will regard this creation of our genius. It will reveal the kind of a people we are, what he is destined to be. It will reach far beyond this courtroom and this one android. It could significantly redefine the boundaries of personal liberty and freedom, expanding them for some, savagely curtailing them for others. Are you prepared to condemn him and all who come after him to servitude and slavery? Your Honour, Starfleet was founded to seek out new life. Well, there it sits. Waiting. You wanted a chance to make law. Well, here it is. Make a good one.
PHILLIPA: It sits there looking at me, and I don't know what it is. This case has dealt with metaphysics, with questions best left to saints and philosophers. I'm neither competent nor qualified to answer those. I've got to make a ruling, to try to speak to the future. Is Data a machine? Yes. Is he the property of Starfleet? No. We have all been dancing around the basic issue. Does Data have a soul? I don't know that he has. I don't know that I have. But I have got to give him the freedom to explore that question himself. It is the ruling of this court that Lieutenant Commander Data has the freedom to choose.