Hi. As far as the legal aspects, it depends on whether your husband and his ex have joint physical custody. However, with joint legal custody, his ex can probably make a stink over the haircut if she wants to- though it probably wouldn't score her many points with the court.
I love my 4 year old daughter's hair long, but she has told me she wants it short. I promised her father I'd keep it long, and we have joint legal as well as physical custody, so I don't plan on getting it cut without touching base with him.
But I don't think her age is the issue- cutting doesn't expose her to harsh chemicals, as coloring it pink might. I remember that when I was 6 I begged my mom for a really short haircut. She let me get it. It was ugly- but guess what? It grew back!!! And I was happy to have some control and I guess I liked it at the time. Besides, when my mom made the dicisions about my hair I wound up with a Mullett!!! (I can't be too hard on ther though- it was the 70s.).
Good luck, and don't obsess about it too much. In the scheme of things there will probably be much bigger battles to pick when it comes to parenting issues with your husband's ex. Unless it's really upsetting his daughter, you don't have to pick this one.