How is it possible to train my bladder to only want to urinate at certain times? Is there any danger in holding urine in for extended periods?

Risk of UTI. Prolonged holding of urine can cause the overgrowth of bacteria which can lead to cystitis. It also can train your bladder to only signal the need to urinate when it is about to burst leading to urinary incontinence. Void every 3 hours in order to maintain good bladder health.
Don't do it. No .U mean "can i train myself?". U are in control of your bladder and can train yourself to urinate regularly every 2-3 hours. Holding urine is not a good idea. You are more at risk for developing utis, because regular voiding is part of the natural bladder defense mechanism against utis. Bacteria, after entering bladder can du[plicate every 20-30 minutes.(8 x in1hr, 500x in3hrs, 32, 000x in 5hrs).