For Debian/Ubuntu, something like
dpkg -S *.ko | grep /lib/modules | grep -v linux-image
should work. Disclaimer: I'm illiterate when it comes to pattern matching, so there are probably better ways of doing this. On my system, I get
This does assume that all installed modules are known to the packaging system, but this is generally a good idea anyway. At least on Debian, installing kernel modules as binary packages is generally possible. This approach has the advantage that it tells you which package a kernel module belongs to. Similar approaches should work with other Linux distributions which use a package management system; i.e. most of them.
Since the location of third party modules is similar to those of the in-kernel modules, it is not easy to distinguish them. Querying the package manager makes things easier. However, in my currently running kernel, in the directory
/lib/modules/2.6.32-5-vserver-686-bigmem, I notice that the nvidia modules are in a separate directory from the main kernel modules, namely
/lib/modules/2.6.32-5-vserver-686-bigmem/kernel. I don't know if such a layout is Debian policy or not. The closest thing to Debian kernel policy I am aware of is The Debian Kernel Handbook, but I did not find anything relevant there. Of course, Ubuntu is not bound by Debian policy in any case.