I haven't used FreeBSD for a long time, but I'm considering trying FreeBSD again. I don't have access to a FreeBSD system, yet.
Can FreeBSD distinguish compiled ports from binary packages on official repository?
No! I got a lot of trouble to try to do so. But it is just simple to understand: In /usr/ports/ are most actual software delivered in source code. If you install them they will get at the end of the process a package what will be installed. If you installed a precompiled binary package, the software is maybe older and it contains only the config-settings what was set by anybody other. But on most desktop solutions this is sufficient.
You can now understand what does happens when you mix both kinds of installations. Especial beware of installation-ed packaged dependencies. I would recommend: decide for one way and only do the other if you sure the software didn't depend on anything you installed the one way.
You can upgrade a package with pkg upgrade <pkg-name>. Packages are usually taken from a repository updated quarterly. You can look at /etc/pkgs/FreeBSD.repo to see. Ports are updated far more frequently and this is something that can cause a problem. For example, pkg A uses libA, but then the latest port uses lib2A, so it won't install. If you remove libA it turns out there are 4 other packages that need it too.
While I won't recommend mixing packages and ports, I have found, that for the packages I generally use, if I change using quarterly packages to using latest packages, I run into fewer issues and can generally, if I run into something like what I described above, I can usually fix it (mostly by removing the package and reinstalling the package from ports.)
If changing packages from quarterly to latest, don't use /etc/pkg/FreeBSD.conf, create /usr/local/etc/pkg/repos/FreeBSD.conf. You can copy the existing /etc/pkg/FreeBSD.conf and change quarterly to latest.
Compiled ports do not exist on a repository external to your machine. Only source code and packages (pre-compiled) exist on the offiial repository. Do not mix the use of ports and packages; there must be a thousand discussion threads already on that. Doing that will muck up your machine; though its a decent way to learn. So use ports and a tool like portmaster(8) only, or use packages only with pkg(8).
As an alternative, to get the best of both worlds, consider using a tool like ports-mgmt/synth or ports-mgmt/poudriere. These allow you to download source code from ports, and compile them into packages locally on your machine. Synth can also download prefetch packages when possible. I'm not sure this answers what you are trying to determine, but using the right tools can ensure your system has no internal conflicts. These tools do the checking to prevent the conflicts.
Adding on to scottro's post, new people seem to miss the point that packages are the exact same thing as ports if you ignore that packages are updated quarterly while ports are continuously updated. Packages are created from ports. There is no difference otherwise.