When is it appropriate to give the exact P-value, instead of writing e.g. P<0.05 (also in case of non-significant P-values)?
As a general guideline you want to convey as much information about your results as possible. When you report a p-value as p=0.016 instead of as p<0.02 then the readers will have a more precise view of the results. Often it is also helpful to report the statistic along with it. For instance you can encounter sentences like: "There was a positive effect of X with a coefficient $\beta_X = 0.5$, which was significant ($t = 2.6$, $p = 0.017$)".
The reporting of only $p<0.05$ can be done when one is only interested in strict cut-off levels (but often the cut-off levels are arbitrary). It is also common in graphs or tables where significance is denoted with superscripts like $^\star: p < 0.05$, ${^\star}{^\star}: p < 0.01$, ${^\star}{^\star}{^\star}: p < 0.001$ and in that case it is used as abbreviation to prevent cluttered graphs and tables that become difficult to read.
Instead of p-values, it is also increasingly more popular to report confidence intervals instead. Then the sentence above would become "There was a significant positive effect of X with a coefficient $\beta_X = 0.5$ (95% confidence interval [0.099,0.901] )".
If I have a P-value of e.g. 0.016, should I report it as P=0.01 or P=0.02?
Rounding off p-values might give a false idea. However, you could round up and use an inequality sign like $P<0.02$.
When I have a very small P-value, e.g. 0.00000013, is it appropriate to report it as P<0.000001, or is it better to stop at e.g. P<0.001?
The precision that is appropriate will depend on the application.
Often more precision than below $0.001$ is not needed. Also a better precision can be deceptive because the computation depends on several assumptions and the p-value is an estimate that can be computed with high precision, but does not truly have that high precision because of uncertainty in the assumptions underlying the computation. The computation with some model can be performed with a high precision, but that doesn't mean that the result of that computation should be considered as precise (the potential errors due to a wrong model should be considered as well).
In exact sciences like physics where high precision measurements are possible and a strong theoretical framework is present it is more common to see high precision p-values. For instance in some fields of physics one desires the significance to be below above $5\sigma$ which is equivalent to $p < 0.00000057$.