Your description is almost correct - note that when sodium metal burns in air, it forms primarily sodium peroxide (Na2O2) in addition to sodium oxide (Na2O). Sodium peroxide will react with hydrochloric acid to give sodium chloride and hydrogen peroxide. Heating will decompose that to water plus oxygen. You should still be able to get the sodium chloride product that you expected.