Can a compound be a heterogeneous mixture?
No. A compound is homogeneous matter that is a pure substance.
Homogeneous matter can be a pure substance (elements and compounds), or homogeneous mixtures (solutions).
The only way for a compound to be a heterogeneous mixture is if it is present in two or more states, such as water and ice, or dry ice (frozen carbon dioxide) and carbon dioxide gas. However, after a period of time, the water ice will melt and the result is homogeneous matter, and the dry ice will completely sublime, resulting in homogeneous matter.