Typically, patients follow a low calorie, high protein diet for at least 2 weeks (and for as long as 3 months) prior to surgery. Crackers can certainly be included in small amounts as part of this type of diet.
As long as your surgeon has not prescribed a pre surgery liquid diet only, then crackers (ideally lowfat, whole wheat crackers) are FINE to eat!