if my beer is still fermenting don't I run the risk of infecting it if I open the lid?
You know, there is so much all over the place telling brewers, what not to do, do you actually think folks would be saying to use your hydrometer so much? Is it a vast conspiracy to ruin millions of new brewer's batches, so that they flee the hobby and give it a bad rap? Every book, every podcast, every posts talks about gravity of beer...how do you think they get them?
WIth proper care and simple sanitization, you run no risk of infecting your beer by taking a simple gravity reading.
This is what I use, and it works with both buckets and carboys. I replaced the plastic one a year ago with an extra long stainless baster from a kitchen ware store and it is awesome. But the plastic one from any grocery store works fine.

And

Here's what I do....
1) With a spray bottle filled with starsan I spray the lid of my bucket, or the mouth of the carboy, including the bung. Then I spray my turkey baster inside and out with sanitize (or dunking it in a container of sanitizer).
2) Open fermenter.
3) Draw Sample
4) fill sample jar (usualy 2-3 turky baster draws
5)Spray bung or lid with sanitizer again
6) Close lid or bung
6) add hydrometer and take reading
It is less than 30 seconds from the time the lid is removed until it is closed again. More like 15 if you ask me.
Probably less if you have help. And unless a bird flies in your place and lets go with some poop, you should be okay.
But I would wait til next week to even bother taking one, your beer is fine. It is still fermenting away regardless of what your airlock is saying, and if it already reached terminal gravity, letting the yeast clean up after itself is a great thing to do anyway.