I had this issue and could reproduce it by just activating the vibrate (e.g. fipping the silent switch off then on again). You're right, it does sound like something is loose and rattling around in there. When I flipped my 6S upside down and shook it, the loose bit seemed to lodge in. The rattle has since gone away. If it returns and I can reproduce it again, I'll just have the apple store swap it out.
Note: this was a problem on the iPhone 6 as well. People had trouble reproducing it in the store for apple employees because of the crowd noise level in Apple stores. So, if you want to get your phone replaced, show up when the Apple store opens and make sure it is quiet enough to hear the issue.