gh-38405: Call more general algorithm when lattice basis isn't trivial
fixes #38400
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
URL: https://github.com/sagemath/sage/pull/38405
Reported by: Martin R. Albrecht
Reviewer(s): Martin R. Albrecht, Matthias Köppe