Hello. Yes, you can still pass your medicals even if your medical center has diagnosed you with inactive or latent TB. However, you will most likely be placed under Medical Surveillance if that is the case. But no worries, MS is not really a terrible thing but is going to be an extra requirement for you.
Also keep in mind that having inactive TB, means that you will not have any symptons at all and you cant spread it to anybody (Reason why Canada still allows you into the country, given you undergo treatment. Thats the whole point of the Medical Surveillance)