I've been apart from my ex for 6 years, but still get her now and again turning to me for advice. Is sometimes to do with her relationship with her new fella.
Way I've dealt with it was to be open about it with my partner. Told her about it very early on and have always involved her in it. Is done mainly by text messages, so my partner always sees what I'm receiving and what I'm sending back. Is nothing to be secretive about, so my partner doesn't feel threatened by it.
My ex and I have three kids, so things are better if we can behave like adults and be friendly. As far as I'm concerned, we were together a long time and I probably know her better than anyone. She's always valued my advice and knows I won't just say something back because I think it's what she wants to hear. Was one time when I felt she was flirting because things weren't exactly happy in her relationship, but I nipped that in the bud immediately. Never happened again.
I guess some people feel the need to keep in touch with their ex's or seek advice from them. Each to their own I say. I don't as I'd turn to my partner for any advice I need, but doesn't mean my ex is wrong for how she deals with things.