I don't know about the titlebar, but the tray icon can be changed through mIRC Options - Display - Options - Tray - Select (these last two are buttons that need to be clicked)
You can then select almost any icon file (those with a .ico extension will show up automatically, but for the file to be an ico is not mandatory) that you have on your hard drive. I think the restrictions on the icon file are a minimum of 16x16 and a maximum of 256x256, but it's been a long time, and those restrictions may have been altered.