Something similar just happened to me on my iPhone X. I was in the messages app. Had notifications coming in through messages and Snapchat. All of sudden, I hear a one to two seconds of an error/firealarm/buzz like sound. No notifications about it or anything. Check my music player and nothing is paused or playing or even listed like it could have been on play for a second.
Sound went away on its own right away. So weird.