Leaving aside the practicalities of modifying an ICBM for intercept this is tricky to estimate since the ideal situation involves reducing the object to chunks under 20 meters or so evenly, and nuclear weapons are not exactly precision sieving tools. A first order approximation would be to look at the crater sizes of various surface and subsurface nuclear tests. This suggests that breaking a sub 100 meter object into vapor and very small chunks would be possible, but going larger the details of exactly how the detonation happens starts to matter a lot, since ideally you need not only to hit but get a subsurface detonation.
Castle Bravo produced a 2km crater, suggesting that careful placement of a very high vield device could fragment a km sized object, but not probably not as a missile vs asteroid intercept in LEO, and probably at least one chunk would be larger than the 20 meter target size.
This in turn suggests that you cannot do much against extinction level objects noting that as diameter increases volume to be broken up goes up by the cube.
Note that the crater sizes for these smaller asteroids are only kms across, unfortunate for the town under it but not earth shattering. The big concern is the dust produced, and since even after a space detonation the fragments will still hit earth a LEO burst will if anything produce more dust, and also make it radioactive. Airbursting nuclear weapons is normally relatively clean but this detonation will effectively be a ground burst, where that irradiated ground is then spread across a large area for pretty much maximum level of fallout for a given bomb size.
Depending on just how the irradiation occurs it is possible the debris landing around the original target will salt the earth enough to be worse than just a cratering event.
So for a small size range up to 1-2 km across if done just right an ICBM extensively modified for mid course guidance could certainly save a town from becoming a crater or at least reduce the amount of direct damage, but it will also make things problematic everywhere else and therefore shooting becomes a political decision rather than purerly an engineering one.
This complicates a nation seriously researching or testing such a capability.