You can try manually like this:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{calc}
%opening
\title{}
\author{}
\def\tikzmark#1{\begin{tikzpicture}[remember picture]\node(#1){};\end{tikzpicture}}
\makeatletter
\renewcommand\vec[1]{\ifdefined\xsh\relax\else\pgfmathsetmacro\xs{\f@size/3}\def\xsh{\xs pt}\fi\ifdefined\ysh\relax\else\pgfmathsetmacro\ys{\f@size/1.3}\xdef\ysh{\ys pt}\fi\tikzmark{VecStart}#1\tikzmark{VecStop}\begin{tikzpicture}[remember picture,overlay]\draw[->,>=stealth]($(VecStart)+(\xsh,\ysh)$)--($(VecStop)+(-\xsh,\ysh)$);\end{tikzpicture}\let\xsh=\undefined\let\ysh=\undefined}
\makeatother
\begin{document}
$\vec{AB}$
\xdef\xsh{5pt}
\xdef\ysh{14pt}
$$\displaystyle\int\vec{\displaystyle\frac{AB}{3}}dx$$
\end{document}
It is not very easy in usage. You have to define \xsh and \ysh every time before use if you want to control the placing of the arrow.
It is just an idea not really worked as it could and I just adding for plurality.
Output:
