According to a 1999 interview with Ira Steven Behr, it was indeed a matter of rights; they'd wanted to include her in some form, but she wouldn't let them use archive footage and they didn't have the budget to shoot new scenes at her asking price:
Q: Why weren't any past episodes with Terry Farrell shown on the DS9 finale?
Lizzy Liz
ISB: We had planned to see Terry Farrell in the flashbacks but she refused to let us use any of her clips. The way I see it is this: Her manager was informed that we were thinking of using Terry in a scene in the final episode. It would have probably been three hours of work... maybe four. The price they quoted us was too high for the budget. After all, this was a show where we had to cut out hundreds of thousands of dollars from the original draft. Her manager was informed that we weren't going to be able to use Terry. [...] When it came to the issue of the clips, they again felt that they would prefer that we went a different way without using the character of Jadzia Dax.
This is supported by comments made by Ronald D. Moore on his AOL page that same year, as reported by several online sources:
Why was Jadzia excluded from Worf's Memories of DS9? Is there some animosity between Terry Farrel and the ST Execs?
In order to use a clip of someone from a previous episode, you first have to obtain permission from the actor in question. Usually permission is routinely granted and a nominal fee is paid (unlike writers and directors, who receive a flat fee and don't get the option of saying yes or no). In this case, we were unable to obtain permission. And no, we weren't real happy about it.
Interestingly, Farrell herself suggested on Twitter in 2016 that she did give (or would have given) her permission, implying that she wasn't asked directly:
@DyloniusFunk In the finale all the characters did a montage of flashbacks to different moments from past 7 years (1/2)
@DyloniusFunk My dad & i found it funny that for legal reasons Worf couldn't remember any moments with his wife. (2/2).
@4TerryFarrel Isnt that crazy. I gave my permission ever time Paramount asked. Someone dropped the ball that episode.
Presumably the DS9 producers never spoke to Farrell directly, only through her agents, and negotiations just didn't work out, or else there was some miscommunication between the studio and the DS9 writers.