The town is the last population centre before the rebel headquarters in Benghazi - Libya's second city, with a population of one million.
Col Gaddafi's forces say they have taken Ajdabiya and Benghazi is next.
Earlier, the US urged the UN to act in Libya, including a no-fly zone.
US ambassador to the UN Susan Rice said a no-fly zone would bring only limited help. She hoped for an early vote on a draft.
Russia expressed concern at some of the implications of the proposals and put forward a counter-resolution.
Forces loyal to Col Gaddafi are taking ground from rebels, who say they fear "genocide" without swift UN action.
On Wednesday, the International Committee of the Red Cross withdrew from the rebel-held city of Benghazi, 160km (100 miles) from Ajdabiya, saying it feared an imminent attack by Col Gaddafi's forces.
'Over in 48 hours'
The UN Security Council on Wednesday undertook lengthy and difficult negotiations over a resolution aimed at authorising a no-fly zone.
The US has previously been cool on the effectiveness of such a zone, but Ms Rice said this - and further measures - were now needed.
"The US view is that we need to be prepared to contemplate steps that include, but perhaps go beyond a no-fly zone, at this point, as the situation on the ground has evolved and as a no-fly zone has inherent limitations in terms of protection of civilians at immediate risk."
The BBC's Barbara Plett at the UN says the draft resolution contains controversial language authorising all necessary measures to protect civilians, which some interpret as permitting strikes against government ground forces if civilians are under attack.
She says that may have been what Russia's ambassador was referring to when he angrily declared that some members had introduced proposals with far-reaching implications.
Russia has strong reservations about military action, as does China, and instead offered a counter-resolution calling first for a ceasefire.
Western diplomats said it was rejected because it lacked teeth.
Supporters of the draft resolution stressed the urgency of action and are pushing for a vote on Thursday.
Ms Rice said: "We will continue our negotiations early on Thursday, fully focused on the urgency and the gravity of the situation on the ground and it's my hope that we may be in a position to vote a serious resolution as early as Thursday. We're working very hard toward that end."
Pro-Gaddafi troops have been moving closer to Benghazi in recent days.
One of Col Gaddafi's sons, Saif al-Islam, has claimed Benghazi will be recaptured soon even if a no-fly zone is imposed.
"Everything will be over in 48 hours," he told Euronews.
The BBC's Jon Leyne in Benghazi says the situation there is getting more tense by the hour, and the calls for the international community to impose a no-fly zone more desperate.
The BBC's Ian Pannell set out from the opposition stronghold of Benghazi to try to reach Ajdabiya, where both sides claim to be winning
Ibrahim Dabbashi, Libya's ambassador to the UN who has defected from the Gaddafi regime, warned the situation could escalate quickly.
"In the coming hours we will see a real genocide if the international community does not act quickly," he said on Wednesday.
On Wednesday evening, state TV warned residents of Benghazi that they had until midnight (2200 GMT) to abandon rebel locations and arms storage areas, Reuters reports.
Col Gaddafi told Lebanese TV that he did not expect there to be a battle in the city, saying the Libyan people had been helping to oust al-Qaeda elements.
"All the places where they [rebels] are fortified, are now being sterilised with the help of the people... who say where their locations are," Reuters quoted him as telling LBC TV.