Having slight pain on top of right shoulder, sometimes into top of arm, heard shoulder pain could be from lung cancer, is there a way to tell?

Superior Pulmonary. Sulcus tumor, aka pancoast tumor, canc do this. But not common. One investigates with a low tech chest x-ray to eliminate that possibility, and then focus on the likely traumatic, bursal, capsular, and rotator cuff complexities that are more likely.
Rare. Shoulder pain is very common in middle age and the vast majority of times it is related to shoulder problems. Cancer could be possible but it is very unlikely. If you are worried and need some peace of mind seek formal medical evaluation.
Shoulder Pain. The shoulder pain could be due to a variety of causes, statistically unlikely to be cancer. It is true that some lung cancers in the right side can spread to a supra-clavicular node and/or partially obstruct the s vena cava, causing symptoms in the face, and neck. The best way to tell is schedule an appointment w/ your doctor, discuss your concerns, and get tested. A ct or MRI is the best bet.