Regular expression
bad_word = "quotes"
The following regular expression matches the string only if the sentence does not contain the word held by bad_word.
r = /
\A # match the beginning of the string
(?! # begin negative lookahead
.*#{bad_word}\z # do not permit string to end with the bad word
) # end negative lookahead
(?= # begin a positive lookahead
(?: # begin a non-capture group
(?! # begin a negative lookahead
\b#{bad_word}\b # do not match the bad word between word breaks
) # end negative lookahead
. # match a character
)* # end non-capture group and execute >= 0 times
\z # match end-of-string
) # end positive lookahead
/ix # case indifferent and free-spacing modes
r is conventionally written:
r = /\A(?!.*#{bad_word}\z)(?=(?:(?!\b#{bad_word}\b).)*\z)/i
#=> /\A(?!.*quotes\z)(?=(?:(?!\bquotes\b).)*\z)/i
This expression ensures that the string does not contain the bad word. It simply requires that that the string not end with the bad word and that every character in the string is not preceded by the bad word, in which case the bad word cannot be present anywhere in the string. It can be pictured as follows (credit REGEXPER).

Combine r with another regular expression
For any string str and regular expression t we will attempt to match str against the regular expression /#{r}#{t}/. If the match against r is successful (i.e., str does not contain bad_word), an attempt is made to match t, with the internal regex pointer starting at the beginning of the string. The match obviously fails if r is not matched.
Examples
str = "The Donald believes Colorado borders Mexico."
str[/#{r}.*/] #=> "The Donald believes Colorado borders Mexico."
str = "The Donald believes Colorado borders Mexico."
str[/#{r}.*\K(?<=borders )\w+/] #=> "Mexico"
str = "The Donald misquotes everybody."
str[/#{r}.*\AThe \KDonald/] #=> "Donald"
str = "Quotes are a politician's friend"
str[/#{r}.*/] #=> nil
str = "In a sentence quotes are used to repeat something said by someone else."
str[/#{r}In/] #=> nil
str = "no quotes"
str[/#{r}.*/] #=> nil
Note that, for example,
/#{r}.*/
#=> /(?i-mx:\A(?!.*quotes\z)(?=(?:(?!\bquotes\b).)*\z)).*/
Simpler approach
For a string str and regular expression t it would course be much easier to compute
(str !~ /\bquotes\b/i) && str[t]