When you have an appendectomy in emergency, do they put in a catheter?

Sometimes. Reasons for placing a urinary catheter into the bladder include: monitoring a critically ill patient's urine output, relieving a temporary dysfunction of the bladder after surgery, and/or decompressing the bladder to prevent injury during surgery. None of these scenarios are common with appendicitis, but each can occur.
Pretty rarely. When someone has appendicitis and need surgery, they will be asked if they can empty their bladder on their own. If yes, no catheter will usually be needed.