She can, as long as they're not worried that she will just remain in Canada without permission.
I think they'll want a letter of invitation from you, proof that she (or you) has money to pay for her stay without resorting to illegally working, and most important, that she has the means and motivation to return to Pakistan at the end of the visit. I think she'll have to go back to finish her residency, so that is highly in her favour. A letter from whoever's in charge of her residency (the hospital/school or whatever) saying that she's allowed to leave for whatever amount of time would be also useful.