Why does a rectangular glass slab show only the refraction of light and not dispersion?
Your question has to do with the redirection of EM radiation due to a speed change in a new medium (refraction) versus the breakdown of white light into its constituent frequencies, or colors (dispersion).
When a wave approaches a medium of different density, its speed will change. Light waves (EM radiation) do this as well, but we must observe the material's optic density instead. This basically describes the ability to form electric and magnetic fields. If it approaches the material at an angle of incidence of zero (meaning it hits perpendicular to the surface), only the speed change will be of interest. However, if it strikes at any other angle, its path will be redirected. Some people like to say the light "bends"; however, I am hesitant to use that term as light does actually bend near large gravitational bodies--a very different idea. You have observed this if you have ever seen a straw mysteriously change direction when placed in a glass of water. This is diffraction. What's important here is that if the light ray continues back into the original material (so air to glass, back to air, as an example), the ray will redirect to a path parallel to its original path.
Diffraction becomes more interesting when you note that the amount of diffraction varies slightly for each color. When white light (which again is comprised of the rainbow of colors we can see) strikes a new medium at an angle of anything other than zero, it will break into a rainbow. If it encounters the original medium at an interface that is parallel to the original, the rays of different color will coalesce back into white.
So, to answer your question. If white light strikes a rectangular prism, it will begin the process of dispersion. However, when it leaves the glass, the light will join back together. Only in a material like a triangular prism will the rays become permanently separated.