Is it correct to say the standard for written Chinese is Mandarin, regardless of dialect (e.g. Cantonese)?
It depends. To the best of my knowledge, the formal written form of Cantonese is pretty much identical to that used by Mandarin, excepting:


Differences in usage (e.g. 玉米 v.s. 粟米 for "corn")
Usage of traditional v.s. simplified characters, although this is only an issue in that Hong Kong / Macau, which are Cantonese-speaking use traditional characters, whereas Mainland China does not. (Taiwan uses some form of the traditional system as well). So there may be some discrepancy in learning materials.


However, sometimes people will write more "informal", "spoken" Cantonese that will not really be identical (and not just for vocabulary reasons) to written Mandarin. For example, there is a song from the McDull franchise titled as 落街冇錢買麵包 (approximately "going onto the street, [had] no money to buy bread"). 落 (instead of 下) is just a Cantonese usage difference, but 冇 instead of 沒有 is a more "informal" or "vernacular" usage that I have never seen in any explicitly formal context. Your mileage may vary as to whether this sort of thing counts as a "word preference" difference; I would not because this isn't like the case of having different words for "corn".

Similarly, and perhaps more explicitly, sometimes characters like 喺, 係 (e.g. in 我係香港人 instead of 我是香港人, but which can also be used to indicate assent in a way that doesn't really exist in Mandarin), or 唔 (e.g. 唔明白 instead of 不明白) are used informally: I have probably seen such usage on platforms such as Facebook before.

In these cases, the basic grammatical structure is still similar (in the sense that things like word order are still mostly the same, but I wouldn't call this only "pronunciation and word preference" differences, since this isn't just about words for object X being different in Cantonese and Mandarin.

So yes, the "standard" written form should be identical with the exception of pronunciation and word preference to that of Mandarin, but I would really hesitate to say the same thing of the "informal" written forms that can often be found in more informal venues, such as on the internet.