Can I strengthen my wrist and forearm while at the office?
Sure.
You can get these and use them whenever you feel like:
When I tried to do some triceps exercises or some close-grip pull ups, I had some pain that is similar to tennis elbow.
That's not supposed to happen. Probably unrelated to grip strength. I'd suggest making sure your warm-up and technique are good, using lighter weights, and if the problem persists, consult a professional.