Absolutely have to? NO. However the reason for adding a designated ground wire is safety, just like it is in standard outlets, In the case of an electrical leak to the skin of the dryer, the ground will carry the current through the ground wire instead of the human who accidentally touches the "hot" dryer shell and grounded plumbing. Changing the 3 wire outlet to a 4 wire, & also running a separate bare ground wire to that outlet from the ground rod near the electric meter is a simple repair, if you know what you are doing. From your question, I would suggest hiring an electrician, who will wire the outlet according to code, Yes, it costs. Consider the following.
When I was a kid, no outlets were grounded. Our refrigerator had a minor electrical leak, as most do. Whenever someone touched both the fridge and the water tap, they got shocked. A designated ground wire connected to the refrigerator would have solved that problem. We were all lucky. With a worse electrical leak, one of us could have been killed.
The previous answer will work, but will be less safe.