Is One Piece Film Gold canon or not? In the film:  


  Tezoro stated that Loffy defeated Doflamingo, and Sabo has the Flair-Flair Fruit's power. That puts the Gold film after their fight with Doflamingo.


Also  


  After they defeated Doflamingo in the anime, they got separated from each other and Sanji went to his wedding and all that.


So is the film canon? If it is, when does it take place?
As you said, based on the time frame alone the movie cannot be placed anywhere in the manga story line since after Doflamingo was defeated the crew separated once more (the only possibility where this could happen is "far" into the future, after the upcoming reverie/Wano arc).

Also it's worth noting that Oda was only the executive producer on the film (he supervised the art direction), he did not write the story for it.

Generally everything outside the manga is considered non-canon unless Oda specifically declares something as belonging to the main story.