Yes! This is what debootstap is for — at least in Debian-derived distributions like Ubuntu. There are great, straightforward instructions for doing (almost) exactly what you're looking for on the Ubuntu wiki: https://wiki.ubuntu.com/DebootstrapChroot. This has some important steps for bind mounting
/sys/ which you'll need for the chroot part.
Unfortunately, in the Fedora/RPM-based distro world, we don't have anything quite like that, although a) I think anaconda, the Fedora installer, can actually do this, but there's not good documentation for the process and b) you can just
yum install packages into a chroot, which will work but isn't quite the same as getting a real system installed there. The Mock tool does "b" in order to provide a clean environment for package building, and does the bind mounts and everything, and you can actually use it (with
mock shell) for other things in a pinch.
I say "almost exactly what you're looking for" because a chroot OS won't behave quite like a native install. To get closer, you want to use containers, which are basically a system for using Linux kernel features to make that chroot seem more like a full native OS to applications running in it. Right now, the hot topic in this space is Docker, a simple tool for managing and launching containers of all sorts. You can make your own base images (starting by using
debootstrap in a chroot, for example!) or you can launch existing ones from the registry. Try:
$ sudo docker run -i -t fedora /bin/bash
even on an Ubuntu system, and that'll download and put you at a shell prompt inside a Fedora-based container. Or you can use the
ubuntu base on Fedora or anywhere else — the only requirement is that the host kernel isn't ancient (or, of course, you can just run the same OS in the container as your host OS).