Allegro 4 is DirectDraw based, you're pretty much screwed if you want Vsync with that API. There is no function that does Display and Vsync at the same time in DirectDraw.
If you are complete masochist, you can try reading the status of the raster if the video driver actually provides accurate information there.
Otherwise, use the loop with Sleep(1) and GetTickCount() to see if 16.666ms have passed.
You might be able to create a dummy Direct3D 9 device and have it present to an invisible window, that will kinda give you a vsync function.
edit: Oh yeah, there's also one crazy hack that works on Windows 10. (Haven't tested it on Vista, 7, or 8, and it won't work on XP or earlier)
If you call GDI GetPixel on the screen, it forces a vblank wait. This is an undocumented side effect, and may not necessarily work on all computers.
Code:
HDC dc = GetDC(NULL); //get device context of the screen itself
GetPixel(dc, 0, 0); //get color of pixel at 0,0 of screen (triggers a vblank wait)
ReleaseDC(NULL, dc); //release the DC