I have a list of genes and the corresponding GO terms for a non-model organism. Could I calculate enrichment factor from the list of GO terms?
Yes. You could try using clusterProfiler::enricher and pass in your GO-term to gene mappings with the TERM2GENE argument. This won't identify GO-term-depletions though. https://bioconductor.org/packages/release/bioc/html/clusterProfiler.html