Your mileage may vary. I wouldn't do that. It's not only about dependencies problems, but about binary compatibility (https://wiki.ubuntu.com/MarkShuttleworth#What_about_binary_compatibility_between_distributions.3F): Debian packages are likely built with different toolchain versions, so you may incur in troubles.
Basically, since dpkg and apt are shared between Debian and Ubuntu, they will be able to read and use repositories made for "the other side" without problems. However, as soon as you try to install non-trivial packages from a "foreign" repository, you are likely to run into dependency problems. Some packages are named differently on Debian and Ubuntu, so if they were listed as a dependency of the package you are trying to install, you might end up with missing packages or duplicate installations.
From my experience, third-party-software with few dependencies (like NX) may work, but don't try to mix GNU tools or similar stuff.