It is still pretty unclear to me why you want that in the first place. You do not want students to use the library or be explicit about this? Using module:goal is bad practice given the design of the module systems as explained in What is the best practice for "namespacing" imports? - #7 by jan
If you want to prevent or know which library predicates are used you can use the cross referencer (library(prolog_xref)), load and test the program in a module (done anyway for the unit tester) and check this module after loading an running the program for predicates that are imported from the library, e.g.
predicate_property(M:Goal, imported_from(File)).
And most likely there are several more ways