How long did you stay in Thailand before this trip? Were you here last year? If not, I think you will be ok. If I were you, I would go by bus to Vientiane to stay for a week then visit Cambodia or Vietnam, and finally go back to Thailand.
Officers at Nong Khai border is quite strict as many people cross daily but normally if your passport doesn’t show that you stay in Thailand every year for 5 to 6 months with no visa, you will be ok. Staying in Laos and some nearby countries makes you look like you travel for real. Going back to Thailand on the same day is not a good idea.
In the worst case if they invite you into a room to take photo and to question you, give you a verbal warning, you still can go back to Laos and fly home. But I don’t understand how they do that because you are stamped out of Laos but no stamp in Thailand, and you go back to Laos.
With the yellow book, you can apply for a pink ID card. It is handy when you buy train tickets in Thailand for example, that you don’t need to show them the passport.
Chiang Khong border doesn’t have regular Thai -Laos busses so it might take 2 hours to wait for the bus. If you don’t mind the wait, it is ok to use that border.