Hair whitening is a process and it may occur due to genetic factors, stress, micronutrients deficiency, etc. If it's happening at the premature age (less than 40), due to micronutrients deficiency and stress, hair whitening can be prevented.
To answer your question. No. This is a wide-spread myth that hair-coloring or dying speeds up hair whitening unless you use quality hair color or dye. Therefore, always use branded products for your hair.