Hi Pankaj,
This is not very easy but you could use the Global event handlers and add code that checks if it concerns a category that has child items and prevent if from being deleting.
This will only prevent the child items from being deleted but will not show a message dialog like you mentioned. You would therefor have to modify the categories module or make a copy and add the desired code. You could leverage the Action Confirmation of the UniGrid.
Hope this helps.
Cheers,
Jeroen