Bad habit of holding my pee for hours. Can this cause cancer or water retention? When I hold my pee I look very bloated and can literally see my tummy shrink while peeing. How bad is holding your pee?

Bad idea. Not healthy to hold your urine. The bladder stretches and loses it's ability to contract. If repeated over time, this will cause urinary retention when you're older. You don't want that.
Mixed issue. Allowing your bladder to fill up will never cause cancer.Water retention has nothing to do with how often you pee. If anything you are allowing your bladder to maintain a good capacity.The bladder is often smaller for those who pee at the first feeling of fullness and they pay the price with nighttime emptying.
Won't cause cancer . But will cause discomfort...Make an effort to void on a more regular basis.