As another responder said, this concept is known as a gravity tractor.
I did say obvious technical details were still needed. You can't just park something small close to a big object; as you say the small object will be affected much more an simply be pulled in. However, since the gravitational attraction is fairly small, as you note, even a small ion engine can push enough to counter it. Since IOM engines can run for decades on a few pounds of fuel, you aim them at 45 degree angles (so as not to push the asteroid) and poof, the asteroid is pulled towards the space craft - slowly and over a long time, but it is pulled and a little is all you need.
It's not something you can do if you discover an asteroid that will impact in less than a year, this requires time as the effect isn't huge. However, a small effect over 3, 5 or 10 years is plenty to slow down or speed up the asteroid such that it will miss us. You only have to make it get to the time and place of intersection with earth a day or even a few hours later or earlier and the problem is solved.
If we discover an asteroid coming in 6 months, we're basically screwed. There is no Armageddon Movie answer that fixes it.