Yes, it is possible. The code will usually be based on the CGI variable for the customer's IP address, CGI.REMOTE_ADDR.
You will find a good example, together with the ColdFusion source code and usage instructions, on http://code.google.com/p/iptocountrycomponents/. You will be glad to know that this is open source and the contact details of the author are on the site.
You should use the code together with the latest data file for IP-to-country conversion. To get this data file, go to http://software77.net/geo-ip/ . In the "Download" section on the right-hand side of the page, select IPV4 CSV (zip) from the drop-down list and click on the Download button. The file is available as IpToCountry.csv.zip.