If she starts taking her off you when you don't want her to then I think you have to be big and brave and count to 10 then go over to her say, oh that's a nice little cuddle you've had with granny, now you need to come back to mummy so we can finish [whatever it is you were doing].
It's very difficult to do I know - but it's one of those things you need to get used to doing if you have a mil like this otherwise it is going to get worse not better, especially if she gets used to regularly looking after your dd and therefore feeling comfortable around her and you.
But I have found that talking to your dd in times like this and telling her what you are about to do (ie take her away from granny), talking constantly (eg in this case chattering about how she needs to cool down, take clothes off etc) makes it more difficult for your mil to interrupt and undermine you as you are not really talking to her and not giving her a chance to talk while you are doing it.
Also if there is something that your mil is doing that is making the situation worse like in this instance you need to include that in your chatter but in a nice way - so say something like ...and isn't it a shame you can't have any nice cuddles with granny or anyone at the moment because that just makes you all hot and grumpy, poor old granny didn't know that's what heat does to you did she - it's not fair I know but we'll let granny know when you've cooled down and can have a nice cuddle again... yadda yadda yadda
And put in plenty of little sweeteners about how she can have a cuddle later but also put the message in there about granny not knowing about your dd in this situation and what needs to be done to rectify it. Just keep up a long stream of chatter to your daughter about what you are doing and why and how it impacts on you and her and others in the room and hopefully your mil will start to get the picture as well as not being able to change the conversation back to what she thinks. And if she tries to take your dd, you need to keep counting (maybe only up to 5 after the first time and just keep repeating sorry granny, I don't think you heard me say that I needed to do xyz for dd, and then turn directly back to dd and start back on the chattering to your dd.
practise doing this in your head over and over so you can do it in real life. NOt going to be easy but practice will help - both in your head and in reality!