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 ... 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