This is a grammar question. Does it mean "He didn't need to do so in the past" or what? Seems confusing.
Hearts and Hands by O. Henry
"The ambassador," said the girl, warmly, "doesn't call any more. He needn't ever have done so. You ought to know that. And so now you are one of these dashing Western heroes, and you ride and shoot and go into all kinds of dangers. That's different from the Washington life. You have been missed from the old crowd."
it means
He never needs to do so .You have pointed out past only but it applies for all the time.
It suggests that he used to call, even though it wasn't necessary. He no longer calls at all.
"The ambassador doesn't call any more. He needn't ever have done so." What is unspoken is "He needn't ever have done so, but he did."
"He didn't need to do so" - He probably did not actually do it; context will make this clear.
"He needn't have done so" - He did it.
Context is always important; labelling is rarely important.