No. Zac Efron did not appear in The Suite Life of Zack & Cody.
His breakout Disney Channel role was Troy Bolton in the High School Musical franchise (2006–2008). He also guest-starred in The Suite Life on Deck? No, he did not. The confusion may stem from the shared "Zack" name or general Disney Channel crossover era.