You will have no problem with a sensor positioned like that. But, ultrasonic sensors typically don't measure distances below 3cm accurately. In your second image I'm not sure if you meant to say 0.2 to 2 meters or cm (you wrote cm). But, if your second image is correct, and you want to measure from 0.2cm to 2cm, ultrasonic sensors won't work. If you typed it wrong, and are measuring 0.2 to 2 METERS, then you're golden. May I suggest using my NewPing Library which will allow for a very fast ping speed (other libraries can only ping once per second).
Tim