How can I use an Android phone as a media player? Is it possible for me to have a central Android phone connected to my old stereo that will let me cast media from any iOS or Android device on my house? If so how?
This is entirely possible via mDNS/uPNP/DLNA. You don't even have to use a phone for that. Cheaper variants exist, such as dedicated android-based microcomputers with size of a bigger USB stick.

All you need to do is to install an app that will act as a media player with DLNA support. There are plenty of these available, one such app can be DroidUPnP or Yaacc, both available via F-Droid. You can then setup the app as a player and control it from a remote controller software, such as ControlDLNA, also available from F-Droid.

Setup is automatic, you just need to fire up a few servers as media sources. These can be computers, xboxes, other phones and pretty much anything that has a DLNA logo on it.