Aperture's recognition of duplicate images is very restrictive. For an image to be recognized as a duplicate the filenames need to be identical, the file size, and the date. Aperture will check that when importing images and avoid to import duplicates, if you enable the duplicate detection.
But this will not always work when merging libraries. Then duplicate detection will work best, when the second library has originally been exported from the first library and the libraries share projects. When merging independently created libraries containing the same images, Aperture will not necessarily recognize the duplicates. I just checked again - created two libraries, imported into both the same folder with 16 images, then merged the second library into the first. The merge result was a library containing two projects with identical images.
You can merge iPhoto libraries using Aperture by them into one of the libraries, but there are no tools provided to avoid duplicates, if the libraries are not copies of each other.
You mean: Duplicate Annihilator: Aperture Edition?
I only tried the trial for a short time, but did not really use it enough to be abe to give a recommendation.
The iPhoto version of Duplicate annihilator is frequently recommended.