When learning about Stokes' theorem ($\int_{\partial \Omega} \omega=\int_{\Omega} \mathrm d \omega$), we are told that it is just a generalization of the 2nd Fundamental Theorem of Calculus $(\int_a^b F'(x)dx= F(b)-F(a))$. In particular, we are told that we can consider $F(b) - F(a)$ to be an integral over the boundary of the curve $y=F'(x), x \in [a, b]$ -- the boundary is then the disconnected set of points $\{a, b\}$ with an orientation "from $a$ to $b$".
Edit: user8268 indicates that this orientation should $-a$ and $+b$, though I'm not entirely sure why -- other than it makes the equation work.
But is this really integration? Doesn't the "region of integration" of a Riemann integral have to be connected?
Edit: It's not really a region if it's not connected, but I don't know what else to call it.
Is there any way to define a Riemann (or possibly Lebesgue) integral $\int_A f(x)dx$ over $A=\{a,b : a \neq b\}$ (with some orientation)?
Depends on definitions, as always. If one develops Riemann integration exclusively for $\int_a^b f(x)\,dx$, then yes. On the other hand, it takes one line to say that if a set $E$ is the union of finitely many disjoint closed intervals $[a_i,b_i]$, then we define $$ \int_E f(x)\,dx = \sum_i \int_{a_i}^{b_i} f(x)\,dx \tag1 $$ Voilà, we have an integral over some disconnected sets.
Yes. The expression $F(b)-F(a)$ does not fit the framework of Riemann integral, but it can be a legitimate Lebesgue integral with respect to signed measure $\delta_b-\delta_a$. In the interest of consistency with higher-dimensional Stokes formula, it is better to frame it as integral of differential form over a chain, as user86418 did (the language of forms takes a while to get used to, so don't worry if it looks weird now).