With use of the changepage package is simple. For example:
\documentclass{article}
%---------------- Show page layout. Don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\usepackage{lipsum}% For dummy text. Don't use in a real document
\usepackage{graphicx}
\usepackage[strict]{changepage}
\begin{document}
\begin{figure}[ht]
\begin{adjustwidth}{}{-5mm} % <--- new
\includegraphics[width=\linewidth]{example-image-duck}
\end{adjustwidth}
\end{figure}
\lipsum[1][1-4]
\end{document}
![\lipsum[1][1-4]](../../images/68c8afeb0cbaa4cbc08f36379f35d9b3.webp)
(redlines indicate (part of) page layout)
\newlength{\mywidth}\setlength{\mywidth}{\textwidth}\addtolength{\mywidth}{0.5cm}; but if you want the overflow to be balanced between left and right margins you may need to do more. – frabjous Apr 01 '22 at 15:43