Is any device installed on airplane to measure wind speed relative to the ground, and its direction?
The "wind speed relative to the ground" would just be the (vector) difference between ground speed and true air speed:

 (image source)

Most aircraft do not measure ground speed and track directly with instruments installed on the aircraft. It can be measured with a Doppler radar (see Peter Smith's answer), which is only used on military aircraft (mostly helicopters) today.

Ground speed and track can be determined with external tools:


DME: The Distance Measuring Equipment can be used to measure distances to fixed radio beacons equipped with DME (usually VOR/DME or VORTAC). If you know the angle at which you are flying towards/away from/to this station, you can calculate ground speed from the change in distance. Some DME instruments display this:


(image source)

When tracking a VOR, you also know the true track angle required for computing the wind direction.
GNSS: A Global Navigation Satellite System like e.g. GPS allows precise determination of the aircraft's position. The ground speed can be calculated from the change of this position and the true track is simply the direction of change. A more accurate determination is possible by measuring the Doppler shift of the signal (thanks to bogl for pointing this out).
ADIRS: An Air Data Inertial Reference System as installed on airliners knows the aircraft's attitude and position based on integrating data from accelerometers and gyroscopes. It can be updated via GNSS, but would still provide data for ground speed and track without it.


Modern avionics can display the result of these computations directly:


left: Boeing 737 Navigation display (source), right: G1000 (source)