If Android says it's connected to a WiFi network, does that mean it's not using any mobile data? Could it ever happen that somehow an apps insists on using mobile data despite having a WiFi connection? In other words, is the only way to guarantee not to be using mobile data is to disable it?
For context, I noticed Google Photos doesn't sync even though it is set to. If I disable "only sync over WiFi" then it works, even if I am connected to WiFi and have mobile data off. Is it necessary to turn off mobile data to make sure it's not used?
Could it ever happen that somehow an apps insists on using mobile data despite having a WiFi connection?
Yes, an app can do this. There is an API that allows an app to bind itself to a particular network, and it could deliberately select a cellular network. This might make sense for, for instance, an app for managing your cell carrier account (though a lot of those are explicitly exempted from counting toward data plans).
Most apps, however, will not do this: it would generally be quite user-hostile to use up a user's data plan when they're connected to an unmetered Wi-Fi network.