Rare Earth Ions And Quantum Dots As Local Optical Probes Of Electromagnetic Coupling In 2D And 3D Systems