Let $n$ be a positive integer, $k\in \mathbb{C}$ and $A\in \mathcal{M}_n(\mathbb{C})$ such that $\text{Tr } A\neq 0$ and $$\text{rank } A +\text{rank } ((\text{Tr } A) \cdot I_n - kA) =n.$$
Find $\text{rank } A$.
1. **Assume $k \neq 0$**: 
   - If $k = 0$, then $\text{rank}((\text{Tr } A) \cdot I_n - kA) = \text{rank}((\text{Tr } A) \cdot I_n) = n$ because $(\text{Tr } A) \cdot I_n$ is a full-rank matrix when $\text{Tr } A \neq 0$. 
   - This would imply $\text{rank} A = 0$, which contradicts $\text{Tr } A \neq 0$. Hence, $k \neq 0$.

2. **Define $\lambda$**:
   - Let $\lambda = \frac{\text{Tr } A}{k} \neq 0$.
   - Then, $\text{rank}((\text{Tr } A) \cdot I_n - kA) = \text{rank}(\lambda I_n - A)$.

3. **Rank-Nullity Theorem**:
   - By the rank-nullity theorem, $\text{rank}(\lambda I_n - A) = n - \dim \ker(\lambda I_n - A)$.
   - Given $\text{rank} A + \text{rank}(\lambda I_n - A) = n$, we have:
     \[
     \text{rank} A + (n - \dim \ker(\lambda I_n - A)) = n
     \]
   - Simplifying, we get:
     \[
     \text{rank} A = \dim \ker(\lambda I_n - A)
     \]

4. **Eigenvectors and Eigenvalues**:
   - Every vector in $X := \ker(\lambda I_n - A)$ is an eigenvector of $A$ with eigenvalue $\lambda$.
   - Therefore, $X \subseteq \text{Im } A$.
   - Since $\text{rank} A = \dim X$, we have $X = \text{Im } A$.

5. **Diagonalizability**:
   - Since $A$ is diagonalizable, there exists a basis of eigenvectors.
   - The number of nonzero entries on the diagonal of $A$ is equal to $\dim X = \text{rank} A$.

6. **Trace Calculation**:
   - Summing the diagonal elements of $A$, we get:
     \[
     \text{Tr } A = \sum_{i=1}^{\text{rank} A} \lambda = \text{rank} A \cdot \lambda
     \]
   - Substituting $\lambda = \frac{\text{Tr } A}{k}$, we get:
     \[
     \text{Tr } A = \text{rank} A \cdot \frac{\text{Tr } A}{k}
     \]
   - Solving for $\text{rank} A$, we get:
     \[
     \text{rank} A = k
     \]

The final answer is $\boxed{k}$.