Well, physically they have as much control as you and I.
But instinctively they tend not to overthink the issue too much in the way that you and I have become socially obliged to do.
Though dogs can be trained.
And not forgetting that such behaviour is an essential communication tool in doggy society...That and the nasal receptor...Whereas we have lost the knack somewhat, and tend just to complain about the smell.