When you AirPlay, you get to select an Apple TV by name. Give yours a good distinctive name to help select the one you intend to stream to. Settings﹥General﹥About﹥Name﹥
AirPlay settings on Apple TV allow ‘Everyone’ or ‘Anyone on the same network’ or ‘Require password’. Your roommate or neighbor can easily restrict you from accidentally streaming to their equipment. It is best to manage this on the Apple TV, rather than the iOS devices.
To answer your question: While there is no standard GUI setting, to restrict AirPlay on the iPhone and iPad, one could create a Configurator Profile, like is possible for deployment of devices for schools and enterprises. That seems overcomplicated for this situation, though.