This is a complex question. Ethnic and religious tensions in Yugoslavia did not start overnight at the end of the 1980s, but were deep-seated. The apparent unity that crumbled at the end of the decade was more the result of skilful political and intimidating strategies than the effect of shared beliefs about a common national heritage.
Since its establishment after the First World War, the country was ethnically and religiously diverse. It included the Catholic Slovenia and Croatia, the Orthodox Serbia, the Muslim Kossovo, mostly inhabited by Albanians. The Bosnian region was itself divided between Catholic Croats, Orthodox Serbs and Muslims. The Croat alliance with the Fascist Axis during the Second World War and its collaboration to the German and Italian occupation caused a bitter civil war between Croats and Serbs. At the end of the Second World War, the Communist dictator Josip Tito seized power and managed to keep the country united under his regime until his death in 1980. Tito understood that he was to concede a certain degree of independence and decetralization of powers to the different regions that constituted the Yugoslavian federation if he wanted to keep it united. He therefore acted to contain all types of nationalisms.
After Tito's death and with the collapse of the one-party Communist regimes of Eastern Europe in the 1980s, the challenges to Yugoslavian unity came precisely from the rebirth of nationalist feelings in all the regions of the former Federation as well as from the revival of the old bitterness between Serbs and Croats and their mutual ambition to control the region of Bosnia and its largely Muslim population.
So I would say that it would have been difficult to avoid the conflcit. Both internal and external reasons conjured up to dismantle the systems of checks and balances built by Tito