Can I use a method I developed or a data collected with a group in my project with another group? I have developed a method/measure in a project supervised by my PhD advisor, and (a rather limited version of) this method appeared very useful in a project I'm working on in collaboration with a different group (let's call it group X), which has nothing to do with my advisor or my institution. I was wondering if I need to involve my advisor in the project with group X to use this method in the project. Can I just use it without having my advisor as a co-author or do I need to ask for a permission from my advisor for that?

Conversely, the useful of the method for studying the data collected in the project with group X (by other members of group X, not me!), is a good example for how useful the method is, so I'm also considering showing this application on that data as an example later in the paper for this method. Do I need to have anyone from group X as a co-author if I do that? 

More information about the situation:
This particular method itself is new, but is building on previous research done (and published) by other members of my advisor's research group. The project on this method focuses on the significance and useful of the method and has a long way to publication, but the very simple and primary version of this method at a very limited scope has an application in the project I'm doing with group X, and we're going to submit the first paper for that project pretty soon (hopefully).
I have developed a method/measure in a project supervised by my PhD advisor ... Can I just use it without having my advisor as a co-author or do I need to ask for a permission from my advisor for that?


This is a very vague description, but in my field, this is the whole point of having collaborators. You might not need to ask "permission," but you could certainly mention it to your advisor. Unless standards in your field are very different, there's no reason for them to stop you.


  so I'm also considering showing this application on that data as an example later in the paper for this method. Do I need to have anyone from group X as a co-author if I do that? 


Typically, yes