Yes, you can use a Lifetime ISA for both purposes. You can withdraw the funds, including the government bonus, tax-free if you're buying your first home or from age 60 for retirement.