Absolutely. The lensing effect is well understood and is actually one of the ways of looking for dark matter. The reason for this is that a lens distorts as well as magnifying. Here's a galaxy acting as a lens on the light from a galaxy behind it:
You can see that there are a number of long curving images in the picture, around a central bright galaxy. Now they are normal galaxies that are behind the bright galaxy. The light is bent around it, and the lensing effect distorts the image. Incidentally, as it is the mass of the galaxy that is distorting the light, you can use this effect to weigh the galaxy that is acting as a lens. Once again you come up short if you only consider the visible matter, and have to assume that there's a lot of dark matter too.
The point of all this is that if dark matter is acting as a lens, it doesn't just magnify an object, it also distorts the image of it. As long as we're really careful about checking for distortion, it's possible to precisely measure when an object is being lensed, and by how much. This allows astrophysicists to accurately place lensed objects, no matter what it is that is causing the lensing.
The science of gravitational lensing is now very precise and can be used to measure not just the mass of a lensing object, but also the precise distribution of mass throughout the object. It's a very useful tool.