Can a theme or plugin go and fetch another plugin and install it?
For themes, it’s rather straighforward. See https://github.com/thomasgriffin/TGM-Plugin-Activation
For plugins, it’s trickier, since you can’t bundle the same boilerplate code in more than one plugin. See http://wordpress.org/extend/plugins/plugin-dependencies/