Compass feature in all Android phones? Is there a compass sensor or a software emulating a compass in each Android smartphone? Or maybe is there a solution for it problem starting from Android 4.0 ICS?
No, not every Android smartphone has real compass (magnetometer) sensor. Even Google claims that,

Few Android-powered devices have every type of sensor. For example, most handset devices and tablets have an accelerometer and a magnetometer (which refers to compass usage on latter text), but fewer devices have barometers or thermometers.
(Emphasis mine for added info)

Note that Google specifically says most handset devices, which should include most (but not all) phones and tablets.
However, it seems that GPS can be used as a compass too, albeit unreliable. But again, not all Android devices have GPS receiver.
As for software emulation, I haven't found any method that can emulate compass without magnetometer, and thus, I concluded that it's impossible for now.
The conclusion is, since not all Android handsets has compass sensor/GPS receiver, and there is no way to emulate compass without them, the answer is: No, not every Android smartphones have compass feature.