The 29-year-old Nicol, who opens the batting and bowls occasional off-spin, struggled for runs after being handed his Test debut during the Kiwis' recent series against South Africa but has averaged nearly 49 in nine one-day international outings for his country.
Nicol would join Gloucestershire in mid-July to replace the in-form Williamson, who leaves next week to prepare for the Black Caps' tour of West Indies.
Gloucestershire director of cricket John Bracewell said: "New Zealand are sending us another player once our Friends Life t20 competition is over and, at this stage, it looks like being Rob Nicol.
"He would be a like-for-like replacement for Kane Williamson and has a very good first-class record."
