How to know what's my iphone 4s carrier using IMEI?
Indeed, Apple cannot provide you such information and they do not either unlock iPhones. This can be done only through the Mobile Network in which your iPhone is locked to, and you need to meet some criteria (I think they are different to every carrier). The number one requirement is to have paid all the monthly fees and you are the owner of that iPhone (That was very obvious).
Now, in order to find out the Network that blocks your iPhone, you will have to find an online IMEI Checker, like the one it is mentioned in a previous answer. The free imei checker (unfortunately), are not always accurate (I have checked many times the same imei number, and in some cases [very few] the results were changing). There are some paid IMEI checker services, which are very cheap and in case of false results they will fully refund you. You can check the IMEI Checker I have used, and their results (Until now) are very accurate.
I highly recommend to everyone to make those kind of checks before buying an iPhone from an online store. Unfortunately I learn it the hard way, so always double check what you are going to buy! :S