Magnetically confined surface and bulk excitons in a layered antiferromagnet