Is there a default license for code libraries that accompany scientific research papers
In the copyright law that most countries sign onto (e.g., Berne Convention), copyright is assigned upon creation. In other words, if there is no explicit permission, you are not allowed to redistribute it. This is why licensing is so important.

However, if the code is publicly available and you reuse part(s) of it to create your own creative work, you are the copyright holder of that new piece of code. If the original copyright holder is of the opinion you violated their copyright (i.e., they think you copied too much of it directly and made too little additions/changes of your own), you have to substantiate your claim on how you deviated or added sufficiently from the original work to get copyright yourself.

In other words, take the risk or ask for explicit permission/a license to be added (e.g., MIT, GPLv3; see also here).