A ductectomy is a minor surgery in which a single duct is removed from the breast. Usually it's done in the case of a ductal papilloma -- most of which are benign, but which can occasionally be malignant. It can also be done if there is discharge from the breast, to try to identify what is causing it, if it's clear which duct it's coming from.
I had a ductal papilloma a year ago -- the only symptom was bleeding from the nipple on one occasion, and the surgeon who's done both of my lumpectomies told me that if it never bleeds again, we will assume it's benign, but if it happens again, we'll do a ductectomy and biopsy it to be sure.
The surgery involves a very small incision, often made in the areola where it won't show, and removal of very little tissue. The recovery is quite easy, and results of any biopsy should be available within a few days.
Has there been a needle biopsy already, or are they just assuming it's cancer? I would think, if they were expecting a ductal carcinoma (either DCIS or invasive ductal carcinoma), they would be doing a lumpectomy and not a ductectomy; that's what leads me to suspect that they really don't know it's cancer at this point. Unfortunately, since we don't have more information, we can't speculate any further.
I wouldn't panic just yet... it might turn out that everything is fine, even though it probably seems like a major crisis right now.