This is really a GDAL issue, and likely ought to be filed there.
The code referenced is for missing blocks which are returned as zeros. There does not seem to be any other nodata handling in the driver so I'm not sure what is returned for blocks with a mixture of data and nodata. I suspect there needs to be broader nodata support in the driver and that the missing blocks should be handled like the rest of it.
I am cc:ing Howard who wrote the SDE driver though I'm not sure if he is in a position to work on it any more.
I will note that one approach to nodata that does not require setting aside specific "nodata" values is to support nodata masks per GDAL RFC 15:
http://trac.osgeo.org/gdal/wiki/rfc15_nodatabitmask
It would be nice if MapServer supported these masks when available.