On Ranks of Matrices over Noncommutative Domains