Lattice rules in non-periodic subspaces of Sobolev spaces