Lattice model describing scale effects in nonlinear elasticity of nanoinhomogeneities