Thank you for writing.
Some e-coli is contagious and some isn't.
E-coli in the kidneys is often caused by bacteria coming from the urethra - the tube used for urination.
A urinary tract infection that is caused by this bacteria can lead to a kidney infection if not treated properly. You will need to contact your doctor about this matter as to whether there is an issue of contagion based on the kind of e-coli you have.