Vector meson spectral function and dilepton production rate in a hot and dense medium within an effective QCD approach