And vice versa? What about other distributions too?
For pretty much any software where the source code is available you will almost always be able to get it to work perfectly on any Linux distro (and usually any UNIX-like variant)
However, there are several "commercial" software products that will only work on RedHat. One shameful example is HP OpenView (particularly since Bruce Perens, a former DPL worked for HP for several years and Debian was for a short time HP's recommended distro).
These products often have installation scripts that depend on RedHat specific config files or file locations; or require kernel modules that have been pre-built against RedHat distributed kernels.
Through dedication you might be able to get them to run but it's often a huge pain in the ass. And you'll be running in a totally unsupported configuration as far as the vendor is concerned.
I am sure there are a few exception cases, but in general most Linux software is pretty portable across major distros. With Ubuntu and it's cousin Debian being two of the largest distros, it is unlikely that program authors would ignore them. The major exception is that not all versions are packaged for all distros in a prompt fashion. You might run into situations where one distro has a newer version currently in their repositories than another distro.
In general you are more likely to find software packaged for Ubuntu and Not Fedora/RedHat than you are the other way around, but that is a generalization and there is some software found in each that isn't in the others.