I don't recall there being an explicit answer in the canon. As Foo Bar points out, Halo spends very little time on interpersonal ethical issues. We can infer some things, though.
My memory is that the original Fall of Reach novelization implied in John's briefing that Cortana is government property. Given that the Spartans are practically government property themselves, it seems very plausible that the ephemeral copies of the brains of dead geniuses wouldn't themselves have more rights than any human soldiers. While their handlers, teammates, and students treat them as individuals, there's no evidence that the UNSC or ONI do. My memory of it is that John was told to treat Cortana like software, whose safe return had a lower priority than his mission. At least, in the original novelization, before Halo: Reach was released.
We would infer that the only laws that would be broken if someone had killed Cortana would have been destruction of government property.
Different sorts of permissions were instituted programmatically, it's likely that the same would be true for any limitations the UNSC or ONI wanted to impose on their AI. One of the relatively-recent animations made a reference to the Three Laws of Robotics, but it seemed more like the AI needed an override code to the reactor controls. (Incidentally, the UNSC needs to make reactors that are less prone to exploding.)
However, it seems like they didn't want to impose limitations on their AI. They gave their AI a lot of resources and a sandbox of sorts and let them go, in much the same way that some researchers get treated. Some reference to this is made in the original Fall of Reach novel, when Halsey breaks into the ONI facilities during the Covenant attack.
As for a discussion of the ethical treatment of AI, your best bet is actually Red Vs Blue. Being vague in order to avoid spoilers, but in the later seasons there's a pretty major plot arc about AI rights. RvB is obviously not Halo canon, but it is set in the Halo universe.