If the object is under the upper lid, repeated blinking and a careful rinse may help
https://ocularcare698.cloudhinter.com/posts/emergency-eye-care-redlands-a-guide-to-recognizing-serious-eye-symptoms
If the object is under the upper lid, repeated blinking and a careful rinse may help, but persistent pain means it should be examined.