No, rubbing the eye can be detrimental if a foreign body is present. Rubbing can cause the object to embed deeper into the cornea or other parts of the eye. It can also lead to scratches or abrasions on the corneal surface. Instead of rubbing, it's better to blink several times or rinse the eye gently with clean water. If the foreign body doesn't flush out naturally or if there's persistent discomfort, it's essential to consult an eye doctor.