The \\b special marker matches boundaries between word characters ([a-zA-Z0-9_]) and a non-word characters. This includes the start and end of strings:
str_replace(c("545 1st ave", "1st ave, 545", "545 1st"), "\\b([0-9])st\\b", "\\1")
# [1] "545 1 ave" "1 ave, 545" "545 1"