Size-dependent interaction between an edge dislocation and a nanoscale inhomogeneity with interface effects