You do not say what you want to happen instead of the widow line.
You can prevent it absolutely
\documentclass{article}
\usepackage{lipsum}
\displaywidowpenalty=10000
\begin{document}
\lipsum[1-5]
% \par % working solution, results in extra space unless exactly at pagebreak
\begin{equation}
x = 1
\end{equation}
\lipsum[6]
\end{document}
But that is not usually recommeded, but here even a penalty of 9999 is not enough to prevent the break leaving one line as there is so little flexibility on the previous page, just 1pt
possible strech at each paragraph break so only 3pt of flexible glue which is not enough to save one line of text. So ideally if you want to prevent widows you need to add more flexible glue somewhere or re-write the text to avoid the problem when it occurs.
If you add widows-and-orphans
\documentclass{article}
\usepackage{lipsum}
\usepackage{widows-and-orphans}
\begin{document}
\lipsum[1-5]
% \par % working solution, results in extra space unless exactly at pagebreak
\begin{equation}
x = 1
\end{equation}
\lipsum[6]
\end{document}
tex warns you about the widow:
Package widows-and-orphans Warning: Display widow on page 2
so you could take manual correction forcing the page break earlier or later:

\documentclass{article}
\usepackage{lipsum}
\usepackage{widows-and-orphans}
\begin{document}
\lipsum[1-5]
\clearpage
\begin{equation}
x = 1
\end{equation}
\lipsum[6]
\end{document}
or

\documentclass{article}
\usepackage{lipsum}
\usepackage{widows-and-orphans}
\begin{document}
\enlargethispage{\baselineskip}
\lipsum[1-5]
\begin{equation}
x = 1
\end{equation}
\lipsum[6]
\end{document}