It is very hard to answer this question because absolutely no context is provided.
If I were writing a history of the Balkans between 1919 and 1938, I would write “Yugoslavia” rather than “the Yugoslavia” or “the former Yugoslavia.” In the context of the 1920’s and 1930’s, Yugoslavia was the proper name of specific country.
If I were writing something about the Western Balkans today, the name “Yugoslavia” could describe different areas. I do not think that “the former Yugoslavia” is a particularly elegant locution, but it pretty clearly means
the [states that were formerly part of] Yugoslavia
Now the definite article makes grammatical sense. And to be grammatical the adverb “formerly” must become the adjective “former” in the ellipsis.
EDIT:
The original question seemed very vague to me. There is no question that “the former Yugoslavia” is an acceptable locution. I used it above.
There is also no question that proper names generally are not preceded by “the.” That general rule has exceptions. One such exception is that “the” does precede a proper name that is followed by a modifying phrase or relative clause. The question seems to be why does that exception have an exception if the proper name is preceded by an adjective.
Assuming I now understand what question was intended, there are two answers.
First, grammar is what it is. It is not a set of logically derived theorems from a known set of axioms. We can perhaps give a supportable historical explanation for why “You is” is not grammatical, but no logical explanation for the vagaries of the conjugation of the English “be” or for the disappearance of the singular second pronoun “thou” and its conjugation is possible.
Second, in this case, a sort of logic can be retrofitted to the exceptions.
The general grammatical rule is that a definite article shall precede a noun that has, either previously or implicitly, been distinguished from others in the class to which it refers. “The man” refers to a specific, identifiable exemplar of a class.
Proper nouns are a general exception to the preceding rule, possibly on the premise that a class with only one member does not require further identification.
Joe Biden is currently president of the U.S.
There is no need to specify which of the people named “Joe Biden” who are currently president of the U.S. is meant because there is only one.
Now the moment that our thought classifies the single entity that a proper name denotes into a set of multiple entities, we revert to the more general rule.
The thoughtful Joe Biden
The gregarious Joe Biden
The angry Joe Biden
We are now thinking of different behaviors of one man. It is a set with multiple exemplars and we are identifying one of them by an adjective.
Whether this identification occurs through a preceding adjective or following phrase or clause makes no difference.
The former Yugoslavia
is identifying one of a set of names for a particular geographical, linguistic area.