Lattice Points Close to a Smooth Curve and Squarefull Numbers in Short Intervals