Is " he killed his wife of 21 years " ambiguous?
Solution 1:
He killed his wife of 21 years.
It's certainly possible to interpret it as meaning that his wife was 21-years old—although it's unlikely. Most people would not make that assumption.
But compare that sentence to the following:
He killed his underage wife of 15 years.
The overall syntax is the same, as is the use of the preposition of; yet, in this case, we interpret it as meaning that his wife is fifteen-years old. We do so because it wouldn't make sense otherwise.
As such, it's the context that's imparting how we parse and understand what's being conveyed, not, strictly speaking, the grammar itself.
So, in terms of the literal grammar, ambiguity is possible. Although the original sentence is extremely unlikely to be misunderstood, if you want to make the meaning explicitly clear, it would need to be rephrased:
He killed his wife after 21 years of marriage.
As far as headlines are concerned, the common omission of words, historically to preserve space, can often lead to more ambiguity than would otherwise be the case. Double-checking the interpretation of a headline with the body of the story itself is always a good idea.