Both options hold validity in my mind. Certainly, there was a distinct and real fear that America held towards the Soviet Union. This mistrust was rooted in political ideology, but might have also been motivated by the fact that the alliance forged by both nations in the Second World War was done so out of convenience for both sides. There had to be a dual frontal attack to weaken the Axis forces in Europe. The alliance was not forged out of anything else other than convenience. Certainly, some could argue that the fear helped to solidify and consolidate American power in a post war setting marked by decimated economies of scale throughout Europe. Being able to argue that the extent of Russian influence could lead to Communism and the fact that there were few nations that could argue that against such a move because of their own weakened state, the Cold War certainly would have been able to provide enough fuel to drive to become a global superpower.
The necessity of the conflict is one that has been overstated in my mind, particularly as I learn more about the imbalance of power and our amazing over-estimate of Soviet capabilities. The constant rush to develop new and more terrifying weapons at any cost and the blindly responsive nature of our development and procurement process are two other incredibly stupid and costly facets of the Cold War that were not necessary.
I would argue that the Cold War was more of a cover for people to profit from the production, procurement and design of military hardware, much of it unnecessary. Even today we continue to seek the "next-generation" fighter planes even though they are generally useless in today's combat environments in Afghanistan or Iraq. We build B-2 bombers even though the jobs they are doing could far more easily, effectively and cheaply be done with B-52s, a plane designed over fifty years ago.
But the idea of always needing the next big thing continues to help the military industrial complex thrive at the expense of more important things like fiscal responsibility or education, etc.
A country needs wealth to survive. The communist system is incapable of producing enough wealth to survive. A communist government must take new territories in order to get that needed wealth. Everywhere that a communist government took power, it killed the people who did not like it. Stalin killed millions in Ukraine. Mao killed millions in China. Castro killed hundreds if not thousands in Cuba. Pol Pot killed millions in Cambodia. In 1990 there were 17 million people in N. Korea and 45 million in S. Korea, even though N. Korea is bigger. To allow Communist Russia to take over new territories, then to kill all its political enemies in them, would have meant that someday it would have been knocking at the doors of my house and maybe yours.
The United States became an empire around the turn of the century, and a world empire by the end of World War I or perhaps a little earlier. The Soviet Union did not become expansionist until the end of World War II, so the Cold War was not an excuse for America to become a world power - it already was.
The fear of communist expansion after World War II was not unjustified. The USSR expanded into Eastern Europe, threatened Greece and Turkey, there was a revolution in China and a war in Korea. The US reacted with a policy of containment to clear Soviet expansion.
The US could have been whatever it wanted to be after WWII. It was going to be a global superpower no matter what. I do not think that the fear of communism was used as a cover for US imperialism. After all, we had not needed any such cover earlier when we took places like Hawaii and the Philippines as US possessions.
To me, communism is only benign as we look back in hindsight. The communist ideology clearly says that revolution is going to occur across the world and many communists thought that the Soviet Union should help bring that about. The Soviet Union was also very much in a position to harm US allies in Western Europe.
Communism now seems like a harmless thing, but it didn't look that way in 1950, for example, as China became communist, the USSR had the bomb, and North Korea invaded South Korea.
Emergence of USA is the result of a combination of of natural resources of USA, history of internal development of USA and other world development in the world history. While the cold war must have influenced some of the activities that contributed to increase in power of USA, it appears to me that USA would have emerged as a super power even if there was no world war. By this I mean, there was no attempt by communist block to dominate the world using force, and thus there was no need to USA and other countries to oppose such action in form of cold war.
Thus Cold war appears to be genuine response of USA to perceived thereat of communism. Also Most likely USA would have emerged as super power even without the cold war.