I'm making a library and I'm thinking of unit testing the utility functions. The way my unit test would work is by calling the function, then doing CRUD operations on it and seeing if it works.
Is this a good idea, or does this count as doing the testing for the MongoDB package I am using?
If this would test the utility functions in your library (rather than an imported library), then it's a fine idea. Finding problems there before running larger tests would save debugging time.
As a matter of perspective, I'd call this a configuration test, not a unit test since it'd mainly detect configuration problems with the MongoDB server and the network. It's neither a "small test" nor a "fast test" since it depends on a separate server. (The terms matters for communication, to keep each type of test good at its particular purpose, and to decide when to run each test.)
If you want to isolate a test of your library from MongoDB configuration and network problems, a good technique is to mock out its access to the MongoDB server or else to test against an in-memory MongoDB server. This also speeds up the test so it becomes a "fast test" that's fine to run every time on every code change.
If you're asking about testing the MongoDB server itself, then I'd call that an acceptance test. The purpose of acceptance testing is to test requirements on MongoDB that your project depends on, e.g. to catch problems for your project introduced by new releases of MongoDB. Server changes aren't always compatible, or perhaps your project depended on details that it shouldn't. This is a good place for tests of MongoDB semantics that caused past problems for your project.