This map is sourced from the organisation which is funded by the Foreign & Commonwealth Office to provide information to travellers and health professionals:
https://travelhealthpro.org.uk/admin/web/uploads/YF-map-Panama.png
(i.e. it's as 'official' as it's possible to get)
You'll see that the canal forms the boundary between the 'vaccination' and 'no vaccination' areas (which might explain the conflicting information you've received). However reading the text which goes with the map provides this:
"Vaccination is NOT recommended for travellers whose itineraries are limited to areas west of the Canal, the city of Panama,
the Canal area itself, and the Balboa Islands (Pearl Islands) and San Blas Islands"
See here for the whole lot:
https://travelhealthpro.org.uk/country/174/panama#Vaccine_recommendations