Take any two continuous functions $f$ and $g$ from $\mathbb R$ to $\mathbb R$, such that $f(x) - g(x) > \epsilon > 0$ for all $x \in \mathbb R$, and define
$$h(x) = \begin{cases}
f(x) & \text{if } x \in \mathbb Q, \\
g(x) & \text{if } x \in \mathbb R \setminus \mathbb Q.
\end{cases}$$
Then, if I understand the definition correctly, $h$ will be upper semicontinuous at all rational points and lower semicontinuous at all irrational points, while being neither left nor right continuous anywhere. Or course, the same construction works equally well with any partition of $\mathbb R$ into dense subsets.
However, reading between the lines, I guess what you really want is an example of a function which
is (WLOG) upper semicontinuous everywhere,
is neither left nor right continuous as some point $x_0$, and
does not have a local extremum at $x_0$. The second Wikipedia example (involving a two-sided topologist's sine curve) almost works, though, and we can easily tweak it a bit to get
$$f(x) = \begin{cases}
(x^2+1) \sin (1/x) & \text{if } x \ne 0, \\ 1 & \text{if } x = 0.
\end{cases}$$
This function should satisfy the requirements given above for $x_0 = 0$.
Best Answer
Let $f_n(x)=1$ for $x \geq \frac 1 n$ and $0$ for $x <\frac 1 n$. Then $f_n$ is u.s.c. for each $n$ and $\sup_n f_n(x)=1$ for $x >0$, $0$ for $x \leq 0$. This limit function is not u.s.c. (since it is less than $1$ exactly when $x \leq 0$).