It’s known that the Cold War was a huge stand off of two superpowers to protect and spread their ideologies through proxy wars. But have they ever made exceptions by accepting allies of the opposite view?
If you're interested in some of the communist states the US provided aid and assistance to during the Cold War, check out this answer I wrote that touches on the topic.
As for socialist-but-not-communist governments, the list would be quite longer, since every Western European country with a social democratic-led government would qualify. Two major examples would be Clement Atlee's Labour Government in the UK, from 1945 to 1951, which pursued major nationalization programmes and established and expanded major elements of the British social welfare system such as the National Health Service. It was very anti-Soviet, however, and was very much an ally of the US. A second major example would be Francois Mitterand's Socialist government in France. Mitterand himself was president from 1981 to 1995, and the French Socialist Party held a majoirty of seats in the National Assembly (allowing it to form a cabinet government) from 1981 to 1986. Until 1984 this cabinet also included ministers from the French Communist Party. The Socialists in 1981 ran on the "110 Propositions for France", which promised more state intervention in the economy. Ultimately Mitterand moved away from many of those promises in favor of more fiscal austerity (leading to the Communists resigning), but even during this period, despite trying to set an independent foreign policy, France was still part of the Western alliance system. Despite the American alarm at Communist ministers, Mitterand developed good personal relationships with Presidents Reagan and Bush (in no small part because he impressed on them how serious political competition between the French Socialists and Communists actually was).