Bear with me while I rules-lawyer the spirit of the Oath of Feanor because I'm pretty sure that's exactly what Maedhros did.
The Oath is specifically targeted at anyone who "hideth or hoardeth, or in hand taketh, finding keepeth or afar casteth a Silmaril" which I do not believe means anyone who touches a Silmaril, despite "in hand taketh" because all the other stipulations are targeted specifically at people who keep the Silmarils away from the Feanorians, by hiding, hoarding, keeping, or even throwing it far away. It would also just be bizarre if, say, a Feanorian follower returned the Silmaril to their lords and the Oath required that they kill them.
However, the strongest evidence for the Oath only applying (or being interpreted to only apply) to people who deliberately withhold the Silmarils from the Feanorians are Maedhros'/the Feanorians' actions before the 2nd and 3rd kinslayings: in both cases, they send a letter demanding the return of the Silmaril. Now, if by touching/posessing the Silmaril, the deaths of Thingol, Dior, and then Elwing are already demanded by the oath, why in the world would they send a letter (losing part of the element of surprise), not even to declare war, but demanding the Silmaril's return? Sending that letter implies that this can still be resolved peacefully if the Silmaril is handed over.
It's my interpretation that Maedhros/the Feanorians are rules-lawyering this tiny loophole in the oath (regardless of whether the oath is present magically/compulsive/just their own dedication) by deliberately closing their eyes to the fact that the current holder of the Silmaril definitely believes it to be their possession and is deliberately keeping it from the Feanorians---which lasts as long as that holder hasn't confirmed that desire.
After all, Thingol, Dior, and Elwing didn't steal the Silmaril, they received it from family members. If the Feanorians ignore the intent behind their keeping it (before that intent is confirmed by the holder's response to the Feanorian's demand), then they could consider Thingol et al to simply...coincidentally...happen to be holding a Silmaril, not possessing it for themselves and therefore not liable to the oath.
Actually, one line in the text from after Thingol refuses to return the Silmaril even hints that even after that, the situation might be salvageable if the Silmaril is returned by free will: "Celegorm and Curufin vowed openly to slay Thingol and destroy his people if they came victorious from war [this is pre-Nirnaeth], and the jewel were not surrendered of free will" (emphasis mine, Of the Fifth Battle, The Silmarillion).
Of course, the Oath drives the Feanorians to reclaim the Silmarils, and so I view the letters to Thingol, Dior, and Elwing as last-ditch attempts at solving this peacefully (via exploiting the above loophole). (Note: this is not necessarily meant to make the Feanorians more sympathetic, this is just me trying to figure out why they sent those letters.) However, this also dooms them to a kinslaying, because as soon as Dior and Elwing reject returning the Silmaril, they have explicitly or implicitly claimed it for themselves and have now "in hand taketh" the Silmaril instead of just touching it and happening to have it around, which means their deaths are now demanded under the Oath.