A regression implies that $Y$ is actually a function of $X$ (that is, $Y(X)$), but not the other way around ($X(Y)$), right? (since $X$ is assumed to be exogenous to the model, and $Y$ is the endogenous variable.)
Yes, a regression treats $Y$ as a function of $X$ and not the other way around. There is an additive random noise component there, too, which you forgot to include on the right hand side of the equation in the first line of your post.
I do not think Durbin-Watson test is used for assessing exogeneity. You probably mixed it up with Durbin-Wu-Hausman test (or just the Hausman test).
Regarding testing exogeneity in time series, the Hausman test is among the better-known ones; here is a thread explaining how it works. There is another short thread here explaining why it is difficult to test for exogeneity; essentially, you have to examine all possible sources of endogeneity and reject all of them to establish exogeneity, but this is not possible in practice. I may add that this is similar to testing independence: you can never empirically prove that two variables are independent, you can just reject a particular form of dependence between them.
Besides the Hausman test, you may also look at Granger's block exogeneity test mentioned here.
Since the Durbin-Watson test was mentioned, let me add something, even though it is unrelated to testing exogeneity. The Durbin-Watson test might be too specific as it tests for autocorrelation at lag order 1 and not higher order lags; more general tests such as Bresuch-Godfrey or in some instances Ljung-Box could be used instead; here is a good overview and comparison of the two tests. But this is all about testing for autocorrelation, not exogeneity.