You need a full sleep study to determine. An overnight at a sleep center. They are literally quiet facilities with few people about. I recommend talking to your primary care physician (if you're in the US) to tell them what you're doing with breathing and mention a concern of central apnea. They can request the sleep study to make sure your insurance covers it. And yes, a bipap machine would be necessary to correct it. Which might sound awful but your doctor would likely give you a small talk about the strain this can put on your heart. I hold my breath when there's any kind of stress in dreams because I've forced myself to wake up from naps and realized I wasn't breathing. To some degree, a bipap machine will retrain your brain as well. Maybe to a degree where it fixes things in the rest of your day for long periods. The new nose and/or mouth pieces are also much smaller and less intrusive than they used to be.
You sound fairly young and are likely to ignore medical stuff but please don't. At least talk to your doc about it (or find a doc if you don't have one. Again, assuming you're in the US, make an appointment at a hospital satellite office not a doc in the box). This is a psychological issue that is largely fixed by physical medicine.