It is probably a decent approximation to model the magnetic field as a magnetic field from a dipole. To get the magnetic field from a dipole, you just needed to scroll down a little bit (you can ignore the second term with the $\delta$).
In this case, $\mathbf{m}$ will point along the long axis of the bar magnet. However, you don't know the magnitude of $m$. I think it would be difficult to measure precisely. The best way I can think of to do it easily would be to take a gaussmeter and measure the field along the axis of the bar magnet (say 1 cm past the end, 2 cm past the end, etc). This of course requires a tool that can measure a magnetic field.
Fortunately, most smartphones can do this and there are free apps. After reading this question, I searched the app store and downloaded an app called phyphox, and it kind of blew my mind. One of the things it can do is measure X,Y, and Z components of magnetic field. For me, Y was the long axis of the phone, and Z was the normal to the phone. You will have to do some experimenting to figure out where the magnetometer is located in your phone if you go this route. After doing this, you should be able to map out the magnetic field along the long axis of the bar magnet and then fit to your expected form to get the magnitude of the magnetic moment $m$. Then the theory will tell you magnetic field everywhere. You can then double check with your smartphone.