I flew ZRH->LHR on BA0711 today on G-EUOG. I noticed through the cabin door one of the instruments had a yellow INOP sticker across it (see photo). Which instrument was it? I am presuming the instrument has a backup, and the backup was operative, but I had thought the purpose of an backup was so that it could be used if the primary failed in flight? Or is the instrument just 'not important'? What are the rules re flying with INOP instruments?
It is a standby display, specifically a DDRMI (Digital Distance Radio Magnetic Indicator).
The aircraft can be dispatched with inoperative equipment. The process is controlled by a Minimum Equipment List (MEL). The operator will have an MEL for each type of aircraft in their fleet. The MEL is approved by the regulatory authority (FAA, CAA, etc.) and specifies what may be inop and associated restrictions.
I don't know what the BA MEL for the A319 is, but here's a snip from the FAA's Master MEL (MMEL), which is the guidance for each operator to use when creating their MEL.
Following this guidance, the MEL would say you can dispatch with the DDRMI INOP if the FAR equipment minimums are met. That (at least in the US) is along the lines of "navigational equipment necessary for the planned flight".
I am presuming the instrument has a backup, and the backup was operative
The "INOP" instrument itself is a backup. It is a navigation instrument which combines a compass, VOR needles and ADF needles. This backup instrument is an analog version which runs on 70s tech. It is rarely (if ever) needed, only intending to be used when all cockpit computers fail, which is exceptionally rare. The modern version uses computers and the results are displayed on the screens you see.
What are the rules re flying with INOP instruments?
As others have stated, the "Minimum Equipment List" is a document that lists what equipment is essential for an aircraft to be dispatched.
Besides safety, dispatch rate is another reason why there is redundancy in an airliner cockpit. With systems as complex as this (the manual of a modern airliner is thousands of pages long), failures are not unusual. It is more economical to design an aircraft that can still fly with some instruments / systems inoperative rather one which requires everything to be 100% working.
The instrument is a backup VOR gauge. It's there in case manual radio navigation is needed (hardly in a modern airliner) AND the displays are not working.
As it's not an instrument that's vital for getting the aircraft on the ground safely, it's no problem if it's declared INOP (there is probably a maximum time period for it to be marked as such before repairs are required).
Every aircraft has a MMEL (Master Minimum Equipment List) and a MEL (Minimum Equipment List). While the MMELs are published by the producer of the aircraft, MELs are generated by the companies flying these airplanes. Every company may have different MEL for the same aircraft. This MELs cannot be shorter than the MMEL. If that malfunctioning or inoperative equipment is in the MEL that aircraft cannot fly without special permissions.
This is the basic information. For more information you can read Wikipedia or FAA, JAR or EU OPS publications.