Can I undelete a file even if I defragmented the drive?

Possibly. When a drive is defragmented, parts of the drive that are being used are moved to increase performance (by moving them into positions on the drive for quicker serial access). This means it is highly possible that parts of the drive that have data from deleted files on them are overwritten.