Heroku will automatically detect Play! applications and install the Play! runtime for you when you push your code to Heroku. If Play! isn't being installed, its likely that your app is not being detected properly as a Play! app.
In the case of Play! 1.2.x (as in the Dev Center article you were reading), the Play! buildpack that will do the detection, and in the case of Play 2.x, the Scala buildpack is used to detect and install the Play! framework for you. For more information about Heroku Play Framework Support and what is needed for detection, see:
https://devcenter.heroku.com/articles/play-support
If you are still having problems with your app getting detected, I'd recommend cloning and pushing https://github.com/heroku/devcenter-play.git, which is the complete sample app from the Dev Center article you were reading:
git clone https://github.com/heroku/devcenter-play.git
cd devcenter-play
heroku create
git push heroku master
heroku open