Both versions would sound more natural if the "last year" were moved to the beginning:
- Last year, after having been married for ten years, they separated.
- Last year, after being married for ten years, they separated.
- Establish when, add relevant parenthetical background detail, say what happened.
The first version is more appropriate.
It describes their state in a completed past tense, and then says how that state changed.
The second version would be more appropriate where there is no implication of change,
where what happens is in the present relative to the established time,
as in "After being married for ten years they went on their honeymoon" or "… had their first child".
In the second example, "without having ever smoked" would sound more natural as "without ever having smoked".
Again, the first version is more appropriate.
"having smoked" indicates what they did in the past, before getting cancer.
But "without smoking" is a present tense, and sounds more like a result than a cause,
as in "he carried the packages to the car without ever dropping any".
(Compare with "he made it to the car without having dropped any packages".)
But in all these cases there is no actual ambiguity and people would understand the intended meaning regardless of the wording.