I wonder if it is possible at run time to detect that an external Oscillator has gone bad and the application now falls back to internal Oscillator.. specially for the case of STM32F407 MCU?
Read the manual instead of some "datasheet". Manual chapter 6.2.7
6.2.7 Clock security system (CSS)
The clock security system can be activated by software. In this case, the clock detector is enabled after the HSE oscillator startup delay, and disabled when this oscillator is stopped. If a failure is detected on the HSE clock, this oscillator is automatically disabled, a clock failure event is sent to the break inputs of advanced-control timers TIM1 and TIM8, and an interrupt is generated to inform the software about the failure (clock security system interrupt CSSI), allowing the MCU to perform rescue operations. The CSSI is linked to the Cortex®-M4 with FPU NMI (non-maskable interrupt) exception vector.
As explained in another answer, the internal RC oscillator will kick in to let you continue executing code dealing with the failure. This is sometimes referred to as "limp home mode" and is pretty much standard on modern MCUs.
From the datasheet you link,
2.2.12 Clocks and startup
On reset the 16 MHz internal RC oscillator is selected as the default CPU clock. The 16 MHz internal RC oscillator is factory-trimmed to offer 1% accuracy over the full temperature range. The application can then select as system clock either the RC oscillator or an external 4-26 MHz clock source. This clock can be monitored for failure. If a failure is detected, the system automatically switches back to the internal RC oscillator and a software interrupt is generated (if enabled).
There is already hardware in the chip, and a system in place to do what you want.