Your surgeon will generally advise you on how long before your procedure you should not eat and drink, what drugs to take and not to take, and the likely duration of your stay in hospital, and those are the instruction you should follow.
IF you are advised to do so, these are our usual instructions for fasting times and drugs, including your insulin, prior to your surgery. Do not follow these unless specifically advised to do so by your anaesthetist.
For adults, anaesethetists are unlikely to anaesthetise a patient unless they have been fasted for at least six hours prior to the procedure, although there are exceptions for emergency surgery. Water is usually allowed up to 2 hours prior to the procedure. In some cases, there is a bowel preparation that is required, and this will result in not being able to eat for considerably longer than 6 hours dependent on the particular preparation.
However, these fasting times are only general guides, and your specific fasting time will be provided to your for your procedure.
Most tablets are usually continued up to the day of surgery, but there are exceptions for tablets that can thin the blood, such as aspirin, warfarin, and novel anticoagulants. Your surgeon will provide instructions for your specific situation. Tablets can be taken with a small sip of water even when fasting.
However, these are guidelines only, and should not replace specific instructions by your surgeon or specific anaesthetist.