Sorry, to be clear, I said that Mandarin is basically the Han dialect. It is true that a lot of people interchange the names Hanyu, Guoyu, and Putonghua, though they are not exactly the same thing. Just asked my co-worker about this to be sure, he said a lot of people consider Hanyu to be Putonghua even though it's not.
It's like me telling a Chinese person that Canadian English is basically American English, even though it isn't.
It's closer to saying "English is the European dialect of Indo-European". Cantonese, Shanghainese, Taiwanese are all languages spoken primarily by Han people, they are all Han dialects. Of course Mandarin has a priviledged position among them, but that priviledged position has not much to do with the Han people, since it shares that with all the others.
EDIT: it may well be the case that people use "Hanyu" (literally, Han language) as a synonym for "Guoyu" (lit. national language, the Taiwanese version of Modern Standard Mandarin [MSM]) or "Putonghua" (lit. common speech, the PRC version of MSM). "Han language" is a poor English translation for "Hanyu" if that's what you mean.
It's like me telling a Chinese person that Canadian English is basically American English, even though it isn't.