I assume that you are asking about the funding of the Aswan High Dam, and not about any other dam on the Nile River. If so, it is really more accurate to say that the United States and the Soviet Union both offered to fund the dam. Nasser did not really need to try to fund the dam. He had offers just come to him.
The episode of the Aswan High Dam began in the early 1950s. Soon after Nasser led the overthrow of the monarchy in 1952, he became convinced of the need to build the dam. This was, of course, during the Cold War. During the Cold War, the US and the USSR competed for influence around the world. Because the US wanted to have influence in the Middle East, it offered to fund the building of the dam.
However, Nasser did not want to align himself too closely to the US. Instead, he wanted to seem independent. Therefore, he did things that angered the US, such as recognizing the government of Communist China. Because Nasser was trying to be too independent of the US, the US decided to rescind its offer of aid. When this happened, the Soviet Union stepped in and provided aid to build the dam.
This episode is seen as an important point in the Cold War because it weakened US influence in the Middle East and made that region a hot spot in the US-Soviet conflict.