Example 4 Given the inequality $(x+y)\left(\frac{1}{x}+\frac{a}{y}\right) \geqslant 9$ holds for any positive real numbers $x, y$. Then the minimum value of the positive real number $a$ is ( ).
(A) 2
(B) 4
(C) 6
(D) 8
Solution: By Cauchy-Schwarz inequality, we can find
$$
\begin{array}{l}
(x+y)\left(\frac{1}{x}+\frac{a}{y}\right) \geqslant\left(\sqrt{x} \cdot \frac{1}{\sqrt{x}}+\sqrt{y} \cdot \frac{\sqrt{a}}{\sqrt{y}}\right)^{2} \\
=(1+\sqrt{a})^{2} . \\
\text { When } x=1, y=\sqrt{a} \text {, } (x+y)\left(\frac{1}{x}+\frac{a}{y}\right) \text { can }
\end{array}
$$

achieve the minimum value.
Since the inequality $(x+y)\left(\frac{1}{x}+\frac{a}{y}\right) \geqslant 9$ holds for any positive real numbers $x, y$, it also holds for the minimum value of $(x+y)\left(\frac{1}{x}+\frac{a}{y}\right)$, thus we have
$$
(1+\sqrt{a})^{2} \geqslant 9 \text {. }
$$

Solving this, we get $a \geqslant 4$.
When $x=1, y=2$, $a$ achieves its minimum value of 4.
Explanation: The key to applying the Cauchy-Schwarz inequality in this problem is to identify two sets of numbers $\sqrt{x}, \sqrt{y}$ and $\frac{1}{\sqrt{x}}, \frac{\sqrt{a}}{\sqrt{y}}$, and reduce them to a constant $(1+\sqrt{a})^{2}$. The purpose is to establish an inequality about $a$, and then solve this inequality to find the minimum value of $a$. The two reductions in equations (1) and (2) must ensure that the equality can be achieved simultaneously, and using $x=1, y=2, a=4$ ensures that equations (1) and (2) hold simultaneously.