Almost certainly. Capacitive droppers (the Yellow cap) are subject to losing value due to self-healing as a result of the inevitable spikes on the mains.
Strictly speaking, the replacement doesn't need to be an Class X capacitor as it isn't in a direct-across-the-mains application. A 630V DC rated one would do, but to stay as close to the original design as possible, it would best to fit one. If space permits, fit an X1 cap rather than an X2 as it will give more voltage headroom and hopefully last longer before replacement is required again. [Edit: I see the capacitor is inserted in a cutout in the PCB so specific dimensions and space are probably tighter than they look]