State-dependent motional squeezing of a trapped ion: Proposed method and applications