First, no, given the wording of the question: "by demanding identity first". US courts have never held that citizens must immediately comply with non-emergency orders free of back-talk. Let's assume that the refusal is conditional: "I won't comply until you show me your ID". In most (?) jurisdictions, there is no obligation imposed on police to show ID, though I am excluding home searches. There is a policy requirement in Seattle (§7) that
Employees may use a Department-issued business card that contains
their name and serial number to satisfy the request for the
information. Employees will also show their department identification
card and badge (sworn) when specifically requested to do so.
Exception: Employees are not required to immediately identify
themselves if:
- An investigation is jeopardized
- A police function is hindered
- There is a safety consideration
Massachusetts has a law saying that "Such identification card shall be carried on the officer's person and shall be exhibited upon lawful request for purposes of identification".
In the domain of search and seizure law, the court reasoned in Doornbos v. Chicago, regarding a seizure by plainclothes police that
Absent reasonable grounds to think that identification would present
an unusual danger, it is generally not a reasonable tactic for
plainclothes officers to fail to identify themselves when conducting a
stop. The tactic provokes panic and hostility from confused civilians
who have no way of knowing that the stranger who seeks to detain them
is an officer...
it is usually unreasonable for a plainclothes officer to fail to
identify himself when conducting a stop or frisk
As you can see, this identification requirement is tied to constitutional search and seizure limits for which there is voluminous case law regarding what is "reasonable". The scenario that you propose is fairly far from the kind of case identified in Doornbos: is the order from a uniformed officer in a police vehicle? That seems to be what you're describing.
Now we must inquire as to the legality of the order. Picking on Washington state law, RCW 46.61.015 requires that
No person shall willfully fail or refuse to comply with any lawful
order or direction of any duly authorized flagger or any police
officer or firefighter invested by law with authority to direct,
control, or regulate traffic.
RCW 46.61.021 requires a person driving to stop for a LEO, and to identify himself: failure to comply is a misdemeanor. There is no statutory provision that a person can refuse to obey these (or similar sections in the motor vehicle title) until the officer provides ID.
A police officer (in Washington: and I suspect any other state) does not have unrestricted authority to give people orders, there are specific statutory circumstances giving police the power to order people to do things. Obstructing a police officer is a crime, but obstructing an officer is where one "willfully hinders, delays, or obstructs any law enforcement officer in the discharge of his or her official powers or duties", and not "doesn't cooperate". There is a provision, RCW 9a.76.030 where
A person is guilty of refusing to summon aid for a peace officer if,
upon request by a person he or she knows to be a peace officer, he or
she unreasonably refuses or fails to summon aid for such peace
officer
and the "knows to be a peace officer" clause implies either that the officer is uniformed, or has provided identification. Finally, we have "failure to disperse" when a person
congregates with a group of three or more other persons and there are
acts of conduct within that group which create a substantial risk of
causing injury to any person, or substantial harm to property; and (b)
He or she refuses or fails to disperse when ordered to do so by a
peace officer or other public servant engaged in enforcing or
executing the law.
These laws are attuned to emergency needs, thus outside the penumbra of your scenario.
In short, the primary question must be, when can police lawfully give you an order that you must obey, which narrows the matter down to traffic-related matters. The seizure must be reasonable: it is reasonable to require a person to stop for a uniformed officer. Reasonability does not entail that all officers must produce ID when effecting a seizure, but this may be the case with plain-clothes officers. Even when in Seattle with a departmental policy requiring officers to identify themselves, an officer's failure to identify does not render the seizure illegal.