We run our own AGS Services and add them to an ArcGIS Online webmap, configure the popups and other properties and then consume the webmap in a WAB app --- that's the goal anyway. If you add a specific layer from a dynamic map service, it is added to the webmap as a FeatureLayer (in JSAPI speak), so it is essentially a graphics layer with attributes that are displayed when you click a feature.
However, if you add an entire dynamic map service to a webmap, then it uses an identify query task on the service when you click on the map. In the ArcGIS Online viewer, as I turn on an off individual layers it affects which popups are displayed (only for visible layers). But when I put that same webmap into a WAB app, the identify task doesn't seem to honor which layers are turned on and off.