Definitely can do it.
Better yet, though: an HSA allows you to reimburse yourself for medical expenses if you have a receipt. There's no sunset clause on that, no date, no "it has to be within x months". So some people pay for the medical bills out of pocket, save the receipts, and now they can withdraw that money from their HSA whenever they want.
Downside: You're paying post-tax money.
Upside: You can keep the money in the HSA, growing completely tax free, and withdraw it at any time - completely tax-free - for any purpose, as a reimbursement for medical bills paid in the past. It's like keeping it in the best savings account ever, withdrawable at any time.