What you want to do may work, kind of. The problem is that the sensor sends out a cone shaped signal. The signal is not a narrow column that can accurately sense where an edge is entering perpendicular to the signal(i.e. will not tell you how far to the side but will tell you the distance to the top of the curb). Plus, you might end up picking up something on the side of your vehicle. What really makes it interesting is that it might pick it up now but not later and then pick it up again. In other words, it does best if the object comes into range within the cone and parallel to the signal, like in backing up toward another car with the sensor mounted parallel to the ground in your back bumper.
You might get better results if the sensor were mounted lower (cone is smaller) or mount somewhat low and parallel or near parallel to the ground.
Something to consider, although probably a bit pricier. What about a remote camera aimed down so that you can see the side of your tires. That way you get a visual of how close you are. If you are really tricky, you could mount it on the bottom of your mirror on a remote controlled tilt/swivel mount and it could serve dual or multi purpose.