Yes, you can publish paper without affiliation. Research is not limited to academics or industry. Anyone can carry out research and publish paper without affiliation.