It's like being enrolled in school. When you are in high school, you follow the rules (or not) of that school. College is different.
The same is true of state or militia service (same thing) versus Confederate service. A man either belonged to the state militia or a Confederate command, but not both. Partisan Rangers were organized by the Confederate government, so any company organized under the Partisan Ranger act had to be a Confederate command.