Let's say we want to solve the integral $$\iint\sin^2(\theta)\sin(\phi) Y_{lm}^*(\theta,\phi)\,d\theta\, d\phi.\tag{1}$$ I have seen in some contexts that you can make the substitution $$\sin(\theta)\sin(\phi) = -\sqrt{\frac{8\pi}{3}}\mathrm{Im}\Big\{Y_{11}(\theta,\phi)\Big\},\tag{2}$$ so that our integral is now $$-\sqrt{\frac{8\pi}{3}}\iint\sin(\theta) Y_{lm}^*(\theta,\phi)\operatorname{Im}\Big\{Y_{11}(\theta,\phi)\Big\}\,d\theta\, d\phi.\tag{3}$$
I have then seen in the same contexts, that you are able to write this integral equal to $$-\sqrt{\frac{8\pi}{3}}\operatorname{Im}\Bigg\{\iint\sin(\theta) Y_{lm}^*(\theta,\phi)Y_{11}(\theta,\phi)\,d\theta\, d\phi\Bigg\},\tag{4}$$ where the point is that the integral is now the orthogonality relation for spherical harmonics and is equal to a delta function.
But, does this imaginary trick work? It seems fairly outrageous to say that $$Y_{lm}^*(\theta,\phi)\operatorname{Im}\Big\{Y_{11}(\theta,\phi)\Big\} = \operatorname{Im}\Big\{Y_{lm}^*(\theta,\phi)Y_{11}(\theta,\phi)\Big\}.\tag{5}$$
When I saw this, did I see total nonsense, or is it true? If it is true, I am not sure why it would be.
It's hard to tell what you've seen and how you recall it. You may check explicitly your "outrageous" identity (5) fails.
Evaluation of your integral (1) is straightforward, $$\iint\sin^2(\theta)\sin(\phi) Y_{l}^{m *}(\theta,\phi)\,d\theta\, d\phi= i\sqrt{\frac{8\pi}{3}}\int\!\!d\Omega~~Y_{l}^{m *} (Y_1^1-Y_1^{1*})/2 .$$
Recalling that $Y_l^{m*}= (-)^m Y_l^{-m}$, you have the above reducing to $$ i\sqrt{\frac{8\pi}{3}}\int\!\!d\Omega~~(Y_{l}^{m *} Y_1^1+(-)^{m+1}Y_l^{-m} Y_1^{1*})/2 = i\sqrt{\frac{8\pi}{3}}( \delta_{l1} \delta_{m1} + \delta_{l1} \delta_{-m1})/2~. $$
I hope you noticed that the integral in your (4) is real, so its imaginary part vanishes.