After having read the introductions of the Wikipedia articles about "sonar" and "ultrasonic sensor", it is still not clear to me what the differences between the two are. In the context of robotics, is there any difference between these two sensors (terms)?
Sonar, as used in robotics means having an ultrasonic emitter and and ultrasonic receiver. There are also some sonar with a single emitter/receiver.
However, they all use ultrasonic sound ways in order to sense the distance to an object. Well, actually they really sense the time between the emission of the ultrasonic wave and the reception of it, which is proportional to the distance to the object.
I am sure that there are sensors that are true ultrasonic sensors in that they are used only to detect ultrasonic "sounds." For example, if you wanted to detect some of the sounds made by marine mammals, you need to be able to detect ultrasonic waves. I might call this an ultrasonic sensor.
However, since I don't study marine animals, I use "sonar" and "ultrasonic sensor" to mean the same thing.
The main difference is, SONAR (originally an acronym for SOund Navigation And Ranging) is used underwater and uses low frequency sounds (100-500Hz) as well as high frequency sounds (ultrasound, etc).
Ultrasonic sensors are used mostly over the terrain and limited to high frequency sounds.